Creating a Snowflake connection
To create a Snowflake connection:
Warning
If you use a new DataLens object model with workbooks and collections:
- Go to the DataLens home page
. In the left-hand panel, select Collections and workbooks. - Open the workbook, click Create in the top-right corner, and select the appropriate object.
Follow the guide from step 3.
-
Go to the connections page
. -
Click Create connection.
-
Select a 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 rights to access the database you are connecting to.
- User name: Name of the user
-
Check the connection and click Create connection.
-
Enter a name for the connection and click Create.