Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated docs for creds in askdbt #5638

Merged
merged 6 commits into from
Jun 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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** — Launch dbt Explorer and make sure you can access your dbt project information.
- **Jobs** — Review the run history of the dbt jobs.
- **Ask dbt** — 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** — 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
Loading