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

Update get_query_results_as_dict example to demonstrate accessing columnar results as dictionary values #474

Merged
merged 3 commits into from
Jan 14, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use slugify in example
  • Loading branch information
Elize Papineau committed Jan 13, 2022
commit 25ba1eacff9312850eb28147430d8a3185e0751d
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ This macro returns a dictionary from a sql query, so that you don't need to inte
select

{% for city in places['CITY'] | unique -%}
epapineau marked this conversation as resolved.
Show resolved Hide resolved
sum(case when city = '{{ city }}' then 1 else 0 end) as users_in_{{ city | replace(' ', '_') }},
sum(case when city = '{{ city }}' then 1 else 0 end) as users_in_{{ dbt_utils.slugify(city) }},
{% endfor %}

{% for state in places['STATE'] | unique -%}
Expand Down