Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure partition_by is in config if setting require_partition_filter #109

Merged
merged 5 commits into from
Jan 28, 2022

Conversation

oliverrmaa
Copy link
Contributor

@oliverrmaa oliverrmaa commented Jan 26, 2022

resolves #107

Description

This PR adds an additional condition in get_table_options for require_partition_filter. Essentially, both the require_partition_filter and partition_by options must both not be none for require_partition_filter to work. This way, non-partitioned tables cannot have require_partition_filter applied to them.

This should allow users to just put require_partition_filter in the dbt_project.yml file instead of needing to make sure they only add it to configs for models that has partition_by in it.

Checklist

  • I have signed the CLA
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • I have updated the CHANGELOG.md and added information about my change to the "dbt-bigquery next" section.

@oliverrmaa oliverrmaa changed the title initial commit Make sure partition_by is in config if setting require_partition_filter Jan 26, 2022
@cla-bot cla-bot bot added the cla:yes label Jan 26, 2022
@McKnight-42 McKnight-42 self-requested a review January 27, 2022 15:55
@McKnight-42
Copy link
Contributor

@oliverrmaa seems you may be behind dbt-bigquery if you could update your local branch by pulling down the latest changes and re-push should get the other tests to trigger and keeps your local upto date incase you think of something you'd like to add to this later.

@oliverrmaa
Copy link
Contributor Author

@McKnight-42 , okay no problem, I have updated the branch to be up to date with dbt-bigquery

@McKnight-42 McKnight-42 merged commit 6f68dce into dbt-labs:main Jan 28, 2022
siephen pushed a commit to AgencyPMG/dbt-bigquery that referenced this pull request May 16, 2022
…er (dbt-labs#109)

* initial commit

* update changelog

* fix typo in changelog

* Hui's feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make require_partition_filter=true in dbt_project.yml affect only partitioned tables
3 participants