E. Pan
E. Pan

Reputation: 61

Upload CSV files as partitioned table

I have a folder of CSV files separated by date in Google Cloud Storage. How can I upload it directly to BigQuery as a partitioned table?

Upvotes: 2

Views: 830

Answers (1)

Pavan Edara
Pavan Edara

Reputation: 2315

You can do the following:

  • Create partitioned table (for example: T)
  • Run multiple load jobs to load each day's data into the corresponding partition. So for example, you can load data for May 15th, 2016 by specifying the destination table of load as 'T$20160515'

    https://cloud.google.com/bigquery/docs/creating-partitioned-tables#restating_data_in_a_partition

    Upvotes: 2

  • Related Questions