Adt
Adt

Reputation: 333

how to create partition on monthly basis in bigquery

I am trying to upload data into bigquery partitioned table using dataflow .I have successfully uploaded data on date basis and fetched this data on monthly basis using bigquery but my moto is to upload data on monthly basis/yearly basis. Is there any way to do that using dataflow.

Upvotes: 1

Views: 810

Answers (1)

Elliott Brossard
Elliott Brossard

Reputation: 33755

You can have "monthly" partitions by using the date for the start of each month. For August, for example, you would store everything in the yourtable$20170801 partition. You would need to have some application-side logic to determine the appropriate $YYYYmmdd suffix for the table into which you are writing using Dataflow.

Upvotes: 2

Related Questions