Changing BigQuery table field names
https://cloud.google.com/bigquery/docs/manually-changing-schemas
With sql you can change a BQ table field name
e.g.
SELECT * EXCEPT(last_activity_ts, invalid_reason), last_activity_ts as evpo, invalid_reason as evpo_invalid_reason
FROM dataset.tableName
This sql will select all fields except the ones you want to change then change the name using as keyword.
In bq options select the table you want to change and replace table option. The table will replace itself with original table content but with new field names. For large datasets you are paying for entire table scan and can be expensive.
With sql you can change a BQ table field name
e.g.
SELECT * EXCEPT(last_activity_ts, invalid_reason), last_activity_ts as evpo, invalid_reason as evpo_invalid_reason
FROM dataset.tableName
This sql will select all fields except the ones you want to change then change the name using as keyword.
In bq options select the table you want to change and replace table option. The table will replace itself with original table content but with new field names. For large datasets you are paying for entire table scan and can be expensive.
Comments
Post a Comment