BigQuery Partitioned tables insert data from the p

2020-07-09 08:13发布

问题:

We want to start using "Partitioned tables" in BQ But documentation(https://cloud.google.com/bigquery/docs/partitioned-tables) says that using "Streaming inserts" possible only

if the partitioning value is up to 7 days in the past, up to 3 days in the future,

In our case, we have some data which could have q partition value more than 7 days in the past.

We save data via BigQuery REST api

Does it mean that we can't use the partition tables or is there some other workaround this? How to save the data which is out of bounds(7days3days) for a partition table?

In general, the idea is: we have a table with streaming data(~100 records per min) and we want to stream data directly to partitions and then use the partitions for analytical queries

回答1:

To summarize the comment thread:

  • It's not possible to stream to partitions beyond [7 days in the past, 3 days in the future]. This is a performance related limitation, and the team is working to remove it.

  • Workaround: Stream your data to a non-partitioned table, and from there insert into the partitioned one.