Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 committed Nov 6, 2024
1 parent 44b9248 commit 53c0351
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
2 changes: 1 addition & 1 deletion website/docs/docs/build/saved-queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Note that we use the double colon (::) to indicate whether a parameter is nested
| `exports::config::export_as` | String | Required | Specifies the type of export: table, view, or upcoming cache options. Nested within `exports` and `config`. |
| `exports::config::schema` | String | Optional | Schema for creating the table or view, not applicable for caching. Nested within `exports` and `config`. |
| `exports::config::alias` | String | Optional | Table alias used to write to the table or view. This option can't be used for caching. Nested within `exports` and `config`. |
| `exports::config::tag` | String | Optional | Apply a [tag](/reference/resource-configs/tags) (or list of tags) to a resource. Tags help organize and filter resources in dbt. Nested within `exports` and `config`. |
| `exports::config::tags` | String | Optional | Apply a [tag](/reference/resource-configs/tags) (or list of tags) to a resource. Tags help organize and filter resources in dbt. Nested within `exports` and `config`. |

</VersionBlock>

Expand Down
28 changes: 19 additions & 9 deletions website/docs/reference/resource-configs/tags.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,26 +170,36 @@ seeds:
### Apply tags to exports
This following example shows how to apply tags to an export in the `dbt_project.yml` file. The export is then tagged with `order_metrics`.

<File name='dbt_project.yml'>

```yml
[exports](/docs/use-dbt-semantic-layer/exports):
[exports](/docs/build/saved-queries-configure-exports):
jaffle_shop:
customer_order_metrics:
+tags: order_metrics
```

</File>

<File name='dbt_project.yml'>
The second example shows how to apply tags to an export in the `semantic_model.yml` file. The export is then tagged with `order_metrics` and `hourly`.

```yml
[exports](/docs/use-dbt-semantic-layer/exports):
jaffle_shop:
customer_order_metrics:
+tags:
- order_metrics
- hourly
<File name='semantic_model.yml'>

```yaml
saved_queries:
- name: order_metrics
...
exports:
- name: hourly_order_metrics
config:
alias: my_export_alias
export_as: table
schema: my_export_schema_name
tags:
- order_metrics
- hourly
```

</File>
Expand Down

0 comments on commit 53c0351

Please sign in to comment.