I am trying to add new column to BigQuery existing table. I have tried bq command tool and API approach. I get following error when making call to Tables.update().
Try this:
bq --format=prettyjson show yourdataset.yourtable > table.json
Edit table.json and remove everything except the inside of "fields" (e.g. keep the [ { "name": "x" ... }, ... ]). Then add your new field to the schema.
Or pipe through jq
bq --format=prettyjson show yourdataset.yourtable | jq .schema.fields > table.json
Then run:
bq update yourdataset.yourtable table.json
You can add --apilog=apilog.txt to the beginning of the command line which will show exactly what is sent / returned from the bigquery server.