Skip to content

Commit

Permalink
Update exports.md (#5312)
Browse files Browse the repository at this point in the history
move dbt sl export command to 'run exports' dev section. raised in slack
thread here:
https://dbt-labs.slack.com/archives/C03KHQRQUBX/p1713545643546209?thread_ts=1713501995.424989&cid=C03KHQRQUBX

## What are you changing in this pull request and why?
<!---
Describe your changes and why you're making them. If related to an open 
issue or a pull request on dbt Core, then link to them here! 

To learn more about the writing conventions used in the dbt Labs docs,
see the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md).
-->

## Checklist
<!--
Uncomment when publishing docs for a prerelease version of dbt:
- [ ] Add versioning components, as described in [Versioning
Docs](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-entire-pages)
- [ ] Add a note to the prerelease version [Migration
Guide](https://github.com/dbt-labs/docs.getdbt.com/tree/current/website/docs/docs/dbt-versions/core-upgrade)
-->
- [ ] Review the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
so my content adheres to these guidelines.
- [ ] For [docs
versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#about-versioning),
review how to [version a whole
page](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
and [version a block of
content](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-blocks-of-content).
- [ ] Add a checklist item for anything that needs to happen before this
PR is merged, such as "needs technical review" or "change base branch."

Adding or removing pages (delete if not applicable):
- [ ] Add/remove page in `website/sidebars.js`
- [ ] Provide a unique filename for new pages
- [ ] Add an entry for deleted pages in `website/vercel.json`
- [ ] Run link testing locally with `npm run build` to update the links
that point to deleted pages
  • Loading branch information
mirnawong1 authored Apr 19, 2024
2 parents 6da2bab + 1951830 commit 4c0535c
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions website/docs/docs/use-dbt-semantic-layer/exports.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,6 @@ saved_queries:
```
</File>
You can use the following parameters to define an `export`:

| Parameters | Type | Required | Description |
| ------- | --------- | ---------- | ---------------- |
| `name` | String | Required | Name of the `export` object. |
| `saved-query` | String | Required | Name of a saved query that could be used. |
| `select` | List or String | Optional | Specify the names of exports to select from the saved query. |
| `exclude` | String | Optional | Specify the names of exports to exclude from the saved query. |
| `export_as` | String | Optional | Type of export to create from the `export_as` types available in the config. Options available are `table` or `view`. |
| `schema` | String | Optional | Schema to use for creating the table or view. |
| `alias` | String | Optional | Table alias to use to write the table or view. |
## Run exports
Expand All @@ -90,12 +79,24 @@ Once you define exports in your dbt project, then you can run them. There are tw
### Exports in development
You can run an export in your development environment using your development credentials if you want to test the output of the export before production. You can use the following command in the dbt Cloud CLI:
You can run an export in your development environment using your development credentials if you want to test the output of the export before production. You can use the following command to run exports in the dbt Cloud CLI:
```bash
dbt sl export
```

The following table lists the options for `dbt sl export` command:

| Parameters | Type | Required | Description |
| ------- | --------- | ---------- | ---------------- |
| `name` | String | Required | Name of the `export` object. |
| `saved-query` | String | Required | Name of a saved query that could be used. |
| `select` | List or String | Optional | Specify the names of exports to select from the saved query. |
| `exclude` | String | Optional | Specify the names of exports to exclude from the saved query. |
| `export_as` | String | Optional | Type of export to create from the `export_as` types available in the config. Options available are `table` or `view`. |
| `schema` | String | Optional | Schema to use for creating the table or view. |
| `alias` | String | Optional | Table alias to use to write the table or view. |

You can also run any export defined for the saved query and write the table or view in your development environment. Refer to the following command example and output:

**Example**
Expand Down

0 comments on commit 4c0535c

Please sign in to comment.