How to create a partitioned table in bigquery

Google recently announced partitioned tables in BigQuery, which have many benefits. However, I did not find documentation on how to create such tables. How to create such a table in the user interface, in the CLI or in the API (java, etc.)?

+6
source share
2 answers

See the timePartitioning table resource property.
You can experiment with it, I think: o)
For more on this, see Split Tables and Creating and Updating Tables by Date

+4
source
bq query --use_legacy_sql=false ' CREATE TABLE dw_prod.example_table ( company STRING, value FLOAT64, ds DATE) PARTITION BY ds OPTIONS( expiration_timestamp=TIMESTAMP "2028-01-01 00:00:00 UTC", description="Example table create in BQ CLI", labels=[("example","summary")] );' 
0
source

All Articles