2
votes

When I try to use dynamic table partitions in a query in the web UI in BigQuery (like documented e.g. here), i.e.

SELECT * FROM [dataset.table$0-of-3]

I get the following error:

Error: Cannot read partition information from a table that is not partitioned: project:dataset.table$0-of-3

When I try a table that was partitioned with the new date partitioning (bq mk --time_partitioning_type=DAY ...), I do not get an error but instead:

Query returned zero records.

Also, I can't find the documentation on this feature anymore. Has it been deprecated?

2

2 Answers

4
votes

I don't have enough reputation to comment on Mikhail's answer -- so adding an answer here.

At least for now, the dynamic table partitions described in the book were deprecated in favor of table partitioning as described in the latest BigQuery documentation.

We hope to provide richer flavors of partitioning in the future, but they may not be necessarily be available as table decorators.

2
votes

This ($0-of-3) feature was never implemented - hopefuly it will at some point.
The ONLY partitioning decorator that was recently implemented was for date partitioned tables. see more at Partitioned Tables and timePartitioning.type