Skip to content

Commit

Permalink
Add where clause example (dbt-labs#623)
Browse files Browse the repository at this point in the history
* Add where clause example

- Provided example of optional where clause in get_columns_values

* Update README.md
  • Loading branch information
arsenkhy authored Sep 14, 2022
1 parent 6de034b commit 064c2ab
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@ This macro returns the unique values for a column in a given [relation](https://
-- Returns the list sorted alphabetically
{% set payment_methods = dbt_utils.get_column_values(
table=ref('stg_payments'),
where="payment_method = 'bank_transfer'",
column='payment_method',
order_by='payment_method'
) %}
Expand Down

0 comments on commit 064c2ab

Please sign in to comment.