Snowflake Actions Setup
The Snowflake action pack contains the following actions:
- Search Snowflake with SQL
- Search Snowflake with Cortex
Action Pack setup instructions
Create a Snowflake role with read-only access
A role is basically a group that grants specific permissions on certain resources. You may grant a role to a user or to another role (nested roles).
First, we will create a new role called GLEAN_QUERY_SNOWFLAKE_ROLE (kindly do not modify the role name). To do this, run the following queries with the ACCOUNTADMIN role or any role that can create roles and grant access to resources such as tables and Cortex:
Then, we will grant permissions to the required tables and access to Cortex. Here are some templated commands that you can use:
Finally, grant the role to specific users or roles:
You should also be able to revoke the roles you just granted. See documentation.
Create a Snowflake OAuth application
We will use the CREATE SECURITY INTEGRATION command to create the OAuth application. Use the ACCOUNTADMIN or any role that has permission to create a security integration:
Create Snowflake action pack
We will now set up the Snowflake action pack and update the redirect URI in the OAuth application:
- Open Glean Settings page
- Go to Platforms > Actions
- Click on Add button for creating a new action
- Click on the Snowflake Actions box
- Populate the Configuration section
- Set the account identifier field in the configuration. You may set it to the account identifier or account locator. This information can be found by navigating to the account details:
- Replace the account identifiers in the OAuth authorization and client urls below.
- Set the OAuth client id and client secret obtained from the previous step.
- Set the account identifier field in the configuration. You may set it to the account identifier or account locator. This information can be found by navigating to the account details:
- Save the action.
- A callback URL is generated after saving the action. Use that to replace the redirect URL using the below command (with the same role as used for creating the OAuth app).
Setup is now complete. Refer to the end user documentation on how to test this action pack in the agent builder.