Datarails Integrations solution is a paid plan that lets you consolidate all your data sources and seamlessly connect your external apps to the Datarails web app. For more information contact our integrations team here.
This article describes how to synchronize Snowflake data with Datarails. The integration allows you to extract data from Snowflake using designated queries and sync the results to Datarails as CSV files. These files will be used to map the final reports.
You'll need your Snowflake credentials to get started—specifically your username and account identifier.
Step 1: Create a New User On Snowflake
- Create a new SQL notebook in Snowflake
- In the new notebook, run the following SQL command:
CREATE USER Datarails_connector -- Choose the user's name
PASSWORD = 'temporary' -- Not used, but required
DEFAULT_ROLE = SYSADMIN -- Replace with your desired default role
DEFAULT_WAREHOUSE = COMPUTE_WH -- Replace with your default warehouse
DEFAULT_NAMESPACE = SNOWFLAKE_LEARNING_DB.PUBLIC; -- Replace with your default database and schema
- Replace `SYSADMIN`, `COMPUTE_WH`, and `SNOWFLAKE_LEARNING_DB.PUBLIC` with your actual values.
- Ensure the new user has access to the necessary dataset.
Step 2: Data Source Configuration On Datarails
Navigate to Data Sources page in the admin section:
- Navigate to Datarails admin section on the left side navigation bar, and locate the "Data Sources" option.
- To create a new Snowflake integration, locate it and select "+" button on the top left.
- Enter User Details:
- Enter the user name created in Snowflake as the "Username".
- Set "Type" to "Snowflake".
- Fill in your Snowflake "Organization" (your organization name on Datarails). Select “sync user” typically “Sync@your-domain)
- Name your new data source—this is a free-text field. The integration name you provide will later appear in the Fileboxes integration section.
- Account: The Snowflake account identifier can be located in your Snowflake environment. This identifier is referred to as "Account" in the setup. See screenshots below:
- Save and Generate Public Key:
- Click "Save".
- Click "Generate Public Key" to copy it to your clipboard. If you lose the keys, you can always recopy them from the data source configuration.
Step 3: Add Public Key to Your User On Snowflake
- Create another new SQL notebook.
- Execute the following SQL command, replacing "[your user name]" with the user you created in step 2 and "[Paste your public key here]" with the public key from Datarails. If you copied the public key from Datarails, The full command is already on your clipboard, ready to be pasted.
ALTER USER [your user name]
SET RSA_PUBLIC_KEY='[Paste your public key here]';
Step 4: Create a New Filebox
For the most up-to-date and complete instructions on how to create a new Filebox via the workspace or the Excel add-in, please go here.
Step 5: Synchronize the Data
- From Workspace, select the Filebox you just created and click the Settings tab
- Scroll down to the Data Connection section.
- In the FileBox data connection type drop down, choose the data source name you created in step #2.
- Enter a valid Snowflake query in the Query for Sync (#2 in the picture above).
- Click Test; if the settings are accepted, you will see OK in Test Data Integration Box (#3 above)
- Click Sync Now (#4 above).
- On the left top side of the screen, you will see the message, Command Sync Now sent successfully.
Step 6: Review and Verify the Synchronization
- From the Collaboration tab, you can see the audit trail of the synchronization steps and the current status, which should have the status Synced
- From the Review tab, you can see the .csv file that was imported
- To verify that the data is correct, click the three dots ⋮ icon and select Preview Version.
- Compare this view of the data with the view of the data in the Snowflake Console
If all is OK, the process synchronization is complete.
© Datarails Ltd. All rights reserved.
Updated
Comments
0 comments
Article is closed for comments.