Hello!
I have a case when I need to store huge amount of data and I need to partition it by minutes. But BQ supports just 4000 partitions for table but I need some history for this table. Is it possible to make a sharded table and for each shard make a partitioning by minute? For example, I will have tables table_name_20231213 and table_name_20231212 and each of it is partitioned by minute inside?
And also it's strange that you don't have a label for BigQuery...
Hi @Stanislav ,
You're correct that BigQuery limits partitioned tables to a maximum of 4,000 partitions. To manage large datasets that exceed this limit, you can use a combination of sharding and partitioning, but with some important considerations:
Solution:
Sharding by Date:
table_name_YYYYMMDD
. This approach effectively creates daily shards, allowing you to store data beyond the 4,000 partition limit of a single table.Partitioning Limitations:
Example:
table_name_20231213
and table_name_20231212
are sharded by date but not partitioned by minute. They can include minute-level data in their schema for query purposes.Benefits and Considerations:
Additional Points: