Claires suggestions#2
Open
clrcrl wants to merge 4 commits intofhoffa:masterfrom
clrcrl:claires-suggestions
Open
Claires suggestions#2clrcrl wants to merge 4 commits intofhoffa:masterfrom clrcrl:claires-suggestions
clrcrl wants to merge 4 commits intofhoffa:masterfrom
clrcrl:claires-suggestions
Conversation
fhoffa
reviewed
Feb 14, 2020
| AND _table_suffix > '19_' | ||
|
|
||
| {%- if is_incremental() -%} | ||
| {%- if execute -%} |
Owner
There was a problem hiding this comment.
So I'm using this weird complex logic because one of these queries is much better for BigQuery:
- SELECT * FROM
*WHERE _table_suffix < '2019_01' - SELECT * FROM
*WHERE _table_suffix < (SELECT date FROM ...)
One is a constant and will prune how much data is read. The other one is variable, and BigQuery doesn't optimize it as well.
I can get that as a constant by using run_query(). I have another option, but it doesn't work now (dbt-labs/dbt-core#2136)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Did these in separate commits so you can take or leave what you'd like!
Add a gitignore
.gitignoreSpecify a project (database) for sources
database:parameter (==projecton BQ) means that I can query things in your project! However, it breaksdbt docs generatesince I don't have permission to read your information schema:Fix errant SQL
Use simpler incremental logic