Skip to content

Commit

Permalink
Updated docs for creds in askdbt (#5638)
Browse files Browse the repository at this point in the history
## 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).
-->
Updating the way we want users to setup their credentials for ask dbt
## 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

---------

Co-authored-by: Ly Nguyen <[email protected]>
Co-authored-by: Ly Nguyen <[email protected]>
  • Loading branch information
3 people authored Jun 10, 2024
1 parent 40ba976 commit 714a662
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,26 +54,28 @@ Configure dbt Cloud and Snowflake Cortex to power the **Ask dbt** chatbot.
1. Select **Deploy > Environments** from the top navigation bar. From the environments list, select the one that was identified in the **Semantic Layer Configuration Details** panel.
1. On the environment's page, click **Settings**. Scroll to the section **Deployment connection**. The listed database is the default for your environment and is also where you will create the schema. Save this information in a temporary location to use later on.

1. In Snowflake, verify that your SL user has been granted permission to use Snowflake Cortex. This user must have the ability to read and write into this schema to create the Retrieval Augmented Generation (RAG). For more information, refer to [Required Privileges](https://docs.snowflake.com/en/user-guide/snowflake-cortex/llm-functions#required-privileges) in the Snowflake docs.
1. In Snowflake, verify that your SL and deployment user has been granted permission to use Snowflake Cortex. For more information, refer to [Required Privileges](https://docs.snowflake.com/en/user-guide/snowflake-cortex/llm-functions#required-privileges) in the Snowflake docs.

By default, all users should have access to Snowflake Cortex. If this is disabled for you, open a Snowflake SQL worksheet and run these statements:

```sql
create role cortex_user_role;
grant database role SNOWFLAKE.CORTEX_USER to role cortex_user_role;
grant role cortex_user_role to user SL_USER;
grant role cortex_user_role to user DEPLOYMENT_USER;
```

Make sure to replace `SNOWFLAKE.CORTEX_USER` and `SL_USER` with the appropriate strings for your environment.
Make sure to replace `SNOWFLAKE.CORTEX_USER`, `DEPLOYMENT_USER`, and `SL_USER` with the appropriate strings for your environment.

1. Create a schema `dbt_sl_llm` in the deployment database. Open a Snowflake SQL worksheet and run these statements:
1. Create a schema `dbt_sl_llm` in the deployment database. The deployment user must have the ability to read and write into this schema and the SL user needs only read access. Open a Snowflake SQL worksheet and run these statements:

```sql
create schema YOUR_DEPLOYMENT_DATABASE.dbt_sl_llm;
grant ownership on schema dbt_sl_llm to role SL_ROLE;
grant ownership on schema dbt_sl_llm to role DEPLOYMENT_USER;
grant select on schema dbt_sl_llm to role SL_USER;
```

Make sure to replace `YOUR_DEPLOYMENT_DATABASE` and `SL_USER` with the appropriate strings for your environment.
Make sure to replace `YOUR_DEPLOYMENT_DATABASE`, `DEPLOYMENT_USER`, and `SL_USER` with the appropriate strings for your environment.

## Configure dbt Cloud
Collect three pieces of information from dbt Cloud to set up the application.
Expand Down Expand Up @@ -124,7 +126,7 @@ To verify the app installed successfully, select any of the following from the s

- **Explore** &mdash; Launch dbt Explorer and make sure you can access your dbt project information.
- **Jobs** &mdash; Review the run history of the dbt jobs.
- **Ask dbt** &mdash; Click on any of the suggested prompts to ask the chatbot a question. Depending on the number of metrics that's defined for the dbt project, it can take several minutes to load **Ask dbt** the first time because dbt is building the RAG. Subsequent launches will load faster.
- **Ask dbt** &mdash; Click on any of the suggested prompts to ask the chatbot a question. Depending on the number of metrics that's defined for the dbt project, it can take several minutes to load **Ask dbt** the first time because dbt is building the Retrieval Augmented Generation (RAG). Subsequent launches will load faster.
The following is an example of the **Ask dbt** chatbot with the suggested prompts near the top:
Expand Down

0 comments on commit 714a662

Please sign in to comment.