Creating a Snowflake connection
To create a Snowflake connection:
-
Open the page for creating a new connection
. -
Under Databases, select the Snowflake connection.
-
Fill out the fields in the Authentication section.
Note
To get the token, create a user with limited access rights on Snowflake.
-
If this is your first connection to Snowflake in DataLens, set up the OAuth integration
:-
In the OAuth integration field, add a name for the integration object using Latin characters, and then click Get snippet.
-
Create an integration: in the Snowflake environment, run the snippet that you copied to the clipboard. Run the snippet code on behalf of the user who has the relevant permission. In the request response, you will get values to insert to DataLens.
Note
You can use the resulting parameters for other Snowflake connections from the same account.
-
-
Fill out the parameters you got after executing the snipped code in the Snowflake environment:
- ACCOUNT_NAME: Name of the account
in the Snowflake environment. - CLIENT_ID: Client ID
for the created integration object. - CLIENT_SECRET: Client secret
.
- ACCOUNT_NAME: Name of the account
-
Click Get token next to the Refresh token
field. This will open the Snowflake page for access approval. Make sure you are logged in with the Snowflake user account with limited access rights.
-
-
Specify the connection parameters under Database details:
- User name: Name of the user
who confirmed the access rights to Snowflake. - Database name: Name
of the database you are connecting to. - Database schema: Database schema
. - Warehouse: Storage
used by the database. - User role: Role of the user
who has access to the database you are connecting to.
- User name: Name of the user
-
(Optional) Make sure the connection works properly. To do this, click Check connection.
-
Click Create connection.
-
Select a workbook to save your connection to or create a new one. If using legacy folder navigation, select a folder to save the connection to. Click Create.
-
Enter a name for the connection and click Create.