-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[CT-1580] [Bug] Warning message produces parameter value from another macro argument, not the one configured #6355
Comments
(Sorry @dbeatty10 , this one happened to catch my eye!) At parse time:
This has confused several other folks: #2793 (comment), plus several issues linked to/from there. I think we need to document it! Maybe here? https://docs.getdbt.com/reference/dbt-jinja-functions/execute Another confusing piece of this might be that we're logging / warning at all during parsing. Macros like Of course, it's possible to avoid this with a modification to the code above: {%- if execute and load_relation(target_rel) is none -%} |
@kd7vrc Thanks again for reaching out about this! We're going to address this with some updates to the docs and close this as Here's the issue we opened as a result: We'd value your feedback on those docs updates as well. |
@dbeatty10 Does |
Is this a new bug in dbt-core?
Current Behavior
A macro that accepts two arguments, and warns based on a condition, and contains one of the parameters in the message outputs the other parameter value in the compile log. (Correct at execution.)
Expected Behavior
A parameterized warning message should produce the correct values for the corresponding parameter.
Steps To Reproduce
Environment
- dbt Cloud: 1.3
Which database adapter are you using with dbt?
snowflake
Additional Context
Documentation indicates that the warning is intended to be used for compilation warning. See https://docs.getdbt.com/reference/dbt-jinja-functions/exceptions#warn
The text was updated successfully, but these errors were encountered: