Inserting into partitioned tables in BigQuery #3208
-
|
So, generally speaking I am used to using partitions for data management in noSQL tables. For instance, Google BigQuery supports partitions, as does HDFS, etc. I am a bit confused as to what the easiest way to insert into a partition (e.g. via a |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Answered my own question. The steps seem to be:
|
Beta Was this translation helpful? Give feedback.
Answered my own question. The steps seem to be:
CreateBigQueryTabletask, specifying atime_partitioning. I note that range partitioning doesn't seem to be supported currently. It would be cool if that were supported though.A downstream
BigQueryTaskthat fulfills the following requirements:destination_tablehas$[DATEID]appended afterwards, whereDATEIDis inYYYYMMDDformat (e.g.20200101, not2020-01-01).querycontains aDATE '[DATEID]' AS dscolumn. Here 'DATEID' is inYYYY-MM-DDformat (e.g.2020-01-01).