I want to move data from table t1 to another table t2 to perform renaming of columns, using option 2 from this document - https://cloud.google.com/bigquery/docs/manually-changing-schemas. Both tables are partitioned by day.
The query I used:
bq query --destination_table=mydataset.t2 --replace --use_legacy_sql=false 'SELECT * EXCEPT(column_one, column_two),
column_one AS newcolumn_one, column_two AS newcolumn_two
FROM
mydataset.t1'
This doesn't preserve the _PARTITIONTIME
and results in all data being partitioned on one day.
Is there any way I can move _PARTITIONTIME
details as well ?