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

Explain behavior of config.get #3969

Open
1 task done
dbeatty10 opened this issue Aug 22, 2023 · 0 comments
Open
1 task done

Explain behavior of config.get #3969

dbeatty10 opened this issue Aug 22, 2023 · 0 comments
Labels
content Improvements or additions to content improvement Use this when an area of the docs needs improvement as it's currently unclear

Comments

@dbeatty10
Copy link
Contributor

dbeatty10 commented Aug 22, 2023

Contributions

  • I have read the contribution docs, and understand what's expected of me.

Link to the page on docs.getdbt.com requiring updates

Docs to update:

#3689 was merged, which might already address the 2nd bullet point.

What part(s) of the page would you like to see updated?

See here for background and details:

Additional information

In an internal slack thread, @gshank noted that:

Instead of config.get("some_name", "some_default") it works with built-in configs to do config.get("some_name") or "some_default" instead

So if I'm interpreting that correctly, then we'd recommend doing this to get behavior that is similar to coalesce():

{% set where = config.get("where") or "your_desired_default_goes_here" %}

History

Here's some historical issues related to how we've reach the current implementation:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Improvements or additions to content improvement Use this when an area of the docs needs improvement as it's currently unclear
Projects
None yet
Development

No branches or pull requests

1 participant