Skip to content

Instantly share code, notes, and snippets.

@isdyy
isdyy / bigquery-add-column.md
Created June 27, 2015 17:55
BigQuery のテーブルに後からカラムを追加する

これの回答がすべてだった: http://stackoverflow.com/questions/16702420/bigquery-add-columns-to-table-schema

現在のスキーマをダウンロード:

bq --format=prettyjson show yourdataset.yourtable > table.json

-> table.json を編集: fields の中身だけ ([ { "name": "x" ... }, ... ]) 残して全て消す. {"schema": ...} でも {"fields": [...]} でもなく、本当に [ {"name": "x" ... }, ... ] の部分だけを残す。