Update Big Query Table Schema

前端 未结 2 604
后悔当初
后悔当初 2021-01-13 19:03

I have a table already in BQ that is populated with data. I want to rename the headings (update the schema) of the table. I\'m using command line tool

Presuming it\'

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-13 19:29

    The correct syntax on command line would be

    bq update --schema col1:STRING,col2,STRING dataset.table

    However, renaming fields is not supported schema change - you will get error message saying

    Provided Schema does not match table

    You can only add new fields or relax existing fields (i.e. from REQUIRED to NULLABLE).

提交回复
热议问题