Skip to content

Commit

Permalink
update to group_by (#4899)
Browse files Browse the repository at this point in the history
this pr updates the the exports code example to 'group_by' and not
'group_bys'. it also update the saved queries parameter too. reported by
Steve Dowling here:
https://dbt-labs.slack.com/archives/C02NCQ9483C/p1707782794575719
  • Loading branch information
mirnawong1 authored Feb 14, 2024
2 parents 01a6e83 + a87a5e6 commit 3b4da75
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions website/docs/docs/build/saved-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ To define a saved query, refer to the following parameters:
| `description` | String | Required | A description of the saved query. |
| `query_params` | Structure | Required | Contains the query parameters. |
| `query_params::metrics` | List or String | Optional | A list of the metrics to be used in the query as specified in the command line interface. |
| `query_params::group_bys` | List or String | Optional | A list of the Entities and Dimensions to be used in the query, which include the `Dimension` or `TimeDimension`. |
| `query_params::where` | List or String | Optional | A list of string which may include the `Dimension` or `TimeDimension` objects. |
| `exports` | List or Structure | Optional | A list of exports to be specified with the exports structure. |
| `query_params::group_by` | List or String | Optional | A list of the Entities and Dimensions to be used in the query, which include the `Dimension` or `TimeDimension`. |
| `query_params::where` | List or String | Optional | A list of strings that may include the `Dimension` or `TimeDimension` objects. |
| `exports` | List or Structure | Optional | A list of exports to be specified within the exports structure. |
| `exports::name` | String | Required | Name of the export object. |
| `exports::config` | List or Structure | Required | A config section for any parameters specifying the export. |
| `exports::config::export_as` | String | Required | The type of export to run. Options include table or view currently and cache in the near future. |
| `exports::config::schema` | String | Optional | The schema used for creating the table or view. This option cannot be used for caching. |
| `exports::config::schema` | String | Optional | The schema for creating the table or view. This option cannot be used for caching. |
| `exports::config::alias` | String | Optional | The table alias to use to write the table or view. This option cannot be used for caching. |

All metrics in a saved query need to use the same dimensions in the `group_by` or `where` clauses.
Expand Down
6 changes: 3 additions & 3 deletions website/docs/docs/use-dbt-semantic-layer/exports.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: "Use exports to materialize tables to the data platform on a schedu
sidebar_label: "Materialize with exports"
---

# Materialize queries with exports <Lifecycle status='new'/>
# Materialize queries with exports <Lifecycle status='new' />

The exports feature in the dbt Semantic Layer enhances the [saved queries](/docs/build/saved-queries) by allowing you to materialize commonly used queries directly within your data platform.

Expand Down Expand Up @@ -50,9 +50,9 @@ saved_queries:
query_params:
metrics:
- YOUR_METRIC_NAME
group_bys:
group_by:
- TimeDimension()
- ... # Additional group_bys
- ... # Additional group_by
where:
- ... # Additional where clauses
exports:
Expand Down

0 comments on commit 3b4da75

Please sign in to comment.