In BigQuery, let's say I have an existing table with X fields. Field 1 is currently INTEGER, but I would like to change it to STRING.
I need to save the data that is currently in field 1, as well as the ability to insert string data into this field.
I believe that in Google BigQuery it is not possible to change the type of a column. I think the only modification we can do with the table is to add columns using the Table.Update command
So what would be best with this?
I thought about this, but I hope there is a better solution:
- Select STRING (field1) as field1, field2, field3, fieldX from MyTable
- Export result to TempTable
- Remove MyTable
- Copy TempTable to MyTable
Then I could insert rows into field1.
google-bigquery
YABADABADOU
source share