4
votes

I have a daily partitioned table, and I want to delete older partitions by API.

The documentation only says that older partitions which are not updated for 3 months are stored with 50% discount. Thanks Google, but I really do not intend to keep those data for half a century.

I thought the whole point of partitioned tables was to allow deleting old data, but all I find is a discount. Is there a way of doing this?

1
I am waiting for the feature as well. DML statements that modify partitioned tables are not yet supported. cloud.google.com/bigquery/docs/reference/standard-sql/…Pentium10

1 Answers

2
votes

You can use Tables: delete API to delete specific partition of the table by specifying that partition as yourTable$YYYYMMDD

And you can use timePartitioning.expirationMs property to set Number of milliseconds for which to keep the storage for a partition. You can set this property either while creating table via Tables: insert API or you can patch existing table via Tables: patch API