Skip to content

Commit fe0e8eb

Browse files
Update README.md (dbt-labs#872)
* 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>
1 parent 2e874ea commit fe0e8eb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ This macro returns the unique values for a column in a given [relation](https://
651651
- `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
652652
- `column` (required): The name of the column you wish to find the column values of
653653
- `where` (optional, default=`none`): A where clause to filter the column values by.
654-
- `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.
654+
- `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.
655655
- `max_records` (optional, default=`none`): The maximum number of column values you want to return
656656
- `default` (optional, default=`[]`): The results this macro should return if the relation has not yet been created (and therefore has no column values).
657657

0 commit comments

Comments
 (0)