Skip to content

Commit

Permalink
Update run_query.md
Browse files Browse the repository at this point in the history
Hi.
This modification proposal is intended to make the code more elegant and less demanding on the warehouse.
Regards.
IL.
  • Loading branch information
ialdg authored Apr 1, 2024
1 parent 12413e2 commit 7ca02cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website/docs/reference/dbt-jinja-functions/run_query.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,14 @@ Here's an example of using this (though if you're using `run_query` to return th

```sql

[comment]: I propose this modification to make the code more elegant and less demanding on the warehouse. Regards.
{% set payment_methods_query %}
select distinct payment_method from app_data.payments
order by 1
{% endset %}

{% set results = run_query(payment_methods_query) %}

{% if execute %}
{% set results = run_query(payment_methods_query) %}
{# Return the first column #}
{% set results_list = results.columns[0].values() %}
{% else %}
Expand Down

0 comments on commit 7ca02cc

Please sign in to comment.