You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues, and I could not find an existing issue for this bug
Current Behavior
dbt.config.get("missing_key", "default_value") default value dosen't work. This behavior creates an Undefined variable inside the context after the compilation like this.
github-actionsbot
changed the title
[Bug] dbt.config.get returns Undefined instead of the default value in Python model
[CT-1545] [Bug] dbt.config.get returns Undefined instead of the default value in Python model
Nov 23, 2022
This feels like a relatively simple & self-contained fix, so we'd welcome a contribution for it. Let us know if it turns out to be trickier than expected.
This feels like a relatively simple & self-contained fix, so we'd welcome a contribution for it. Let us know if it turns out to be trickier than expected.
Is this a new bug in dbt-core?
Current Behavior
dbt.config.get("missing_key", "default_value")
default value dosen't work. This behavior creates an Undefined variable inside the context after the compilation like this.Expected Behavior
Steps To Reproduce
Define a model like:
With configs like:
Run dbt compile.
The compiled output will create a
config_dict
like thisIn that case, Undefined is a undeclared variable in the context. Because that, this will create an exception.
Relevant log output
No response
Environment
Which database adapter are you using with dbt?
spark
Additional Context
No response
The text was updated successfully, but these errors were encountered: