Ready to get the most from your Snowflake data? Get started by setting up a connection between Klipfolio Klips and your Snowflake database and adding some data sources.
When you're finished adding Snowflake data sources, you'll use them to power your custom Klips.
Note: Before connecting to your Snowflake database, make sure you have Klipfolio's IP addresses set up in your DB security group.
This article includes:
Adding a Snowflake data source
To add a Snowflake data source:
- Click the + beside Data Sources in the left navigation sidebar.
Note: If you don’t see this option, go to the bottom of the left navigation sidebar and click your Account Name > Data Sources > Create a New Data Source instead. - On the Where is your data? page, select Snowflake.
- On the Configure your connection page, fill in the following fields:
-
Account name: Enter the number that displays under LOCATOR (see the example below).
- Snowflake Region: Choose the appropriate region from the drop-down list.
- Username: Enter the username that’s associated with the appropriate role. Learn more about user roles.
- Private key: Add a private key file. Note: You must copy and paste the entire contents of the key file, including the header and footer text.
- Private key passphrase: Enter the private key passphrase if the key file is encrypted. Note: This information is only required when the key file is uploaded or changed.
- Role: Enter the role that’s associated with the selected account name. PUBLIC is inserted into this field as the default setting but you can replace it if needed.
- Warehouse: Enter the name of the warehouse you want to use to access your data. Warehouses are listed in the Admin section in Snowflake. Note: Make sure the role you entered above has access to the warehouse.
- Database: Enter the name of the database where the data you want to retrieve is stored.
- Schema: Enter the name of the schema within the database that you want to access. Schemas are listed under Databases > <Name of the selected database>.
-
Account name: Enter the number that displays under LOCATOR (see the example below).
- At SQL Query, enter an SQL query to retrieve the desired data. Tip: You can test your SQL queries in Snowflake by adding a SQL worksheet. Learn more here. Go here for more information on querying data in Snowflake.
- At Columns, choose to include or exclude column headers.
(See below for an example of configuration settings for a Snowflake data source).
- Click Get data.
- Ensure this is the data you’re looking for. Optionally select the checkbox to Model your data.
Learn more about modelling data sources. - Click Continue.
- Name, choose refresh settings, and, optionally, share your data source.
- Click Save.
The data source is added to your account and is ready to use for custom Klips. You can see all your data sources in your Data Source Library, accessed by clicking Data Sources in the left navigation sidebar.
Troubleshooting Snowflake queries
Here are a few troubleshooting ideas you can try if you're having issues with your Snowflake query.
- Confirm that the SQL connection is working by using a query of Select 1. This should return the result of 1.
- Make sure your query isn’t trying to bring in too much data. Klipfolio supports a maximum file size of 10 MB. If you’re returning more than 10 MB of data, your query may not work. To see if this is the issue, try adding a LIMIT to your query (e.g., LIMIT 1000) to reduce the amount of data being returned.
- Confirm that it isn't taking too long to bring in your data. Klipfolio includes a global setting of 80 seconds within which to bring in data. If you think this might be the issue, try reducing the amount of your data so you stay within this range.
Next steps
Great! You've connected to your Snowflake data and created one (or more) data sources. Now you're ready to use those data sources in custom Klips. Up next - Build Klips and dashboards.