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

BUG?! base_ga4__events.sql --> Dynamic vs Static partitions IF clause #31

Closed
vibhorj opened this issue Jul 18, 2022 · 5 comments
Closed

Comments

@vibhorj
Copy link
Contributor

vibhorj commented Jul 18, 2022

Context: base_ga4__events.sql -> Line #1 & Line #58

Issues: the conditional IF statement is not executing as expected
{% if var('static_incremental_days', false ) == true %}

Impact: even though I have set a variable static_incremental_days: 3 in dbt_project.yml file, the compiled code still rendering statements meant for dynamic-partitions and not static-partitions as expected

@adamribaudo I can fix, create PR to merge if you agree ?

@dgitis
Copy link
Collaborator

dgitis commented Jul 19, 2022

I noticed a lot of weirdness related to this feature a couple of days ago. If you know a fix, please submit it because I'm a little confused as to why it's not working. I noticed this while working on the streaming branch.

I've also posted my issue in the dbt Slack, but haven't gotten an answer there https://getdbt.slack.com/archives/C99SNSRTK/p1657911399355319.

@dgitis
Copy link
Collaborator

dgitis commented Jul 19, 2022

Actually, I have this fixed in the streaming PR request. My issue in testing seems to be from having multiple profiles on my test machine and somehow my test is getting the wrong data creating what appears to be an error.

@vibhorj
Copy link
Contributor Author

vibhorj commented Jul 19, 2022

@dgitis thank you for sharing.
yes, its the same things I notice - i have created the PR #32

It seems Jinja does not recognize non-null value as true

@vibhorj
Copy link
Contributor Author

vibhorj commented Jul 19, 2022

@dgitis - sorry I did not want to interfere with other changes you might have made for streaming support, therefore I decided to create this PR and limit to this bug fix. thanks for co-operation.

@adamribaudo-velir
Copy link
Collaborator

Great find! Mistake on my part: I meant to look for != false rather than == true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants