Allow require_partition_filter=true for BigQuery table creation
See original GitHub issueDescribe the feature
I would like to have enable require_partition_filter=true in table and incremental mode. https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language#table_option_list
for example, we could config model as
{{
config (
materialized='table',
partition_by='DATE(stamp)',
partition_by_required='true',
)
}}
Currently, in 0.14.3, bigquery/adapters.sql, only persist_docs and temporary options is enable.
Could we make bigquery_table_options macro below flexible to take in any other options, so that we could pass a generic key/value list in model config to create table options
{% macro bigquery_table_options(persist_docs, temporary) %}
for example, we could config model as
{{
config (
materialized='table',
partition_by='DATE(stamp)',
options = '{ partition_by_required=true, partition_expiration_days=7 }'
)
}}
Additional context
This feature is BigQuery-specific.
Who will this benefit?
This feature will benefit anyone who use BigQuery partition tables, and users of BigQuery in general.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:8
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Creating partitioned tables | BigQuery - Google Cloud
Required permissions. To create a table, you need the following IAM permissions: bigquery.tables.create; bigquery.
Read more >Allow require_partition_filter=true for BigQuery table creation
Describe the feature I would like to have enable require_partition_filter=true in table and incremental mode.
Read more >Google BigQuery Create Table Command: 4 Easy Methods
In this article, you will learn about the Google BigQuery create table command, its usage, examples & how to query a table or...
Read more >A Simple Way to Query Table Metadata in Google BigQuery
Let's explore this concept with Google BigQuery. ... List all tables and their creation time from a single dataset with TABLES view ...
Read more >Set up BigQuery Export - Analytics Help - Google Help
Step 1: Create a Google API Console project and enable BigQuery; Step 2: Prepare your project for BigQuery Export ... Navigate to the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
If no one hasn’t worked on it yet, I will send a PR.
@soltanianalytics thanks so much for the heads up! The logic you implemented reminds me a lot of https://github.com/fishtown-analytics/dbt/issues/1034. I think this is a problem we’ll generally need to solve on BQ sometime soon - it’s great to know that these two pieces of functionality are related.