Skip to content

Commit

Permalink
Update README.md (#872)
Browse files Browse the repository at this point in the history
* Update README.md

Update doc for get_column_values() to specify that the order_by argument must be expressed as an aggregate function.

* Add missing blank space

---------

Co-authored-by: Doug Beatty <44704949+dbeatty10@users.noreply.github.com>
  • Loading branch information
bakerbryce and dbeatty10 authored Apr 10, 2024
1 parent 2e874ea commit fe0e8eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ This macro returns the unique values for a column in a given [relation](https://
- `table` (required): a [Relation](https://docs.getdbt.com/reference/dbt-classes#relation) (a `ref` or `source`) that contains the list of columns you wish to select from
- `column` (required): The name of the column you wish to find the column values of
- `where` (optional, default=`none`): A where clause to filter the column values by.
- `order_by` (optional, default=`'count(*) desc'`): How the results should be ordered. The default is to order by `count(*) desc`, i.e. decreasing frequency. Setting this as `'my_column'` will sort alphabetically, while `'min(created_at)'` will sort by when thevalue was first observed.
- `order_by` (optional, default=`'count(*) desc'`): How the results should be ordered. Must be an aggregate function, i.e. count(*), max(sort_order). The default is to order by `count(*) desc`, i.e. decreasing frequency. Setting this as `'my_column'` will sort alphabetically, while `'min(created_at)'` will sort by when the value was first observed.
- `max_records` (optional, default=`none`): The maximum number of column values you want to return
- `default` (optional, default=`[]`): The results this macro should return if the relation has not yet been created (and therefore has no column values).

Expand Down

0 comments on commit fe0e8eb

Please sign in to comment.