Bhavik Desai
Bhavik Desai

Reputation: 35

Google BigQuery: How to add partition manually

I have a daily partitioned table with a single partition holding 10M rows.I want to add another 10M rows from 10 csv files (holding 1M rows each) for yesterday's data into another partition. Do i have to create yesterday's partition manually and then load data into it ? how do i do it ?Is there any way i can directly load previous date records in a pre-existing table using 'BQ load' Command ?

Upvotes: 0

Views: 319

Answers (1)

Mosha Pasumansky
Mosha Pasumansky

Reputation: 13994

You don't need to do anything special, just specify tablename$partitiontime as destination for the load command, i.e.

bq --time_partitioning_type=DAY --source_format=CSV
  'dataset.tbl$20170516' /tmp/file.csv

Upvotes: 2

Related Questions