STORAGE.REQUIRE_PARTITION_FILTER
Target database: Google BigQuery
STORAGE.REQUIRE_PARTITION_FILTER option updates the selected partitioned table queries to require partition filter.
Target DMBS | Entity types | Feature |
---|---|---|
Google BigQuery | TABLE | When set true, every query on that table must include at least one predicate that only references the partitioning column |
See also:
Usage
STORAGE.REQUIRE_PARTITION_FILTER: true
Notes
Check Export SQL/Entity SQL after defining a PARTITION_KEY to see generated DDL.
Google BigQuery
Can be used with partitioned tables, created either through DISTRIBUTION_KEY or PARTITION_SCHEME.
Examples
Google BigQuery partitioned table having partition filter required
Key definition:
KEY NAME: F_TRIP
KEY TYPE: PARTITION_KEY
ATTRIBUTE NAME: category
Physical option definitions:
Physical option name: STORAGE.PARTITION_SCHEME
Physical option value: RANGE_BUCKET(<entity_partition_key>, GENERATE_ARRAY(0, 1000, 200))
Physical option name: STORAGE.REQUIRE_PARTITION_FILTER
Physical option value: true
DDL generated by Agile Data Engine:
CREATE TABLE pub.F_TRIP
(
...
)
PARTITION BY RANGE_BUCKET(category, GENERATE_ARRAY(0, 1000, 200))
OPTIONS (
require_partition_filter = true
);