horse
horse

Reputation: 61

BigQuery batch loading into partitioned table

I'm loading data into BQ partitioned table from GCS. Every day one date partition. How I can use WRITE_TRANCATE for partition, not for the whole table? I want to overwrite partition data. How it should be implemented?

I'm using code like this https://cloud.google.com/bigquery/docs/samples/bigquery-load-table-partitioned

Upvotes: 1

Views: 680

Answers (1)

Sergey Geron
Sergey Geron

Reputation: 10172

Try to specify the partition you want to overwrite (instead of a whole table):

table_id = "your-project.your_dataset.your_table_name$20210527"

Upvotes: 1

Related Questions