Reputation: 1371
We have currently a couple of authorized views in the big query for various teams
Currently, we are using partition_date
column to use in the query to reduce the amount of data processed (reference)
#standardSQL
SELECT
<required_fields,...>,
EXTRACT(DATE FROM _PARTITIONTIME) AS partition_date
FROM
`<project-name>.<dataset-name>.<table-name>`
WHERE
_PARTITIONTIME >= TIMESTAMP("2018-05-01")
AND _PARTITIONTIME <= CURRENT_TIMESTAMP()
AND <Blah-Blah-Blah>
However, due to the number of users & data we have, it's very hard to maintain the quality of big query scripts leading us with increased query cost with the relatively increasing number of users.
I see we can use --require_partition_filter
(reference) when creating TABLEs
. So, could someone help me address the following questions
--require_partition_filter
on view level? FYI, for someone who wants to update the current table with the above filter, I see we can use bq update
command (reference) which I am planning to use for existing partitioned tables.
Upvotes: 1
Views: 3306
Reputation: 33755
Upvotes: 3