Before you start
You need a Data Connector account and a warehouse that’s already been set up for your organization. For both, see Get started with the Data Connector. You also need Superset running, with the Snowflake driver installed. For installation, see the Apache Superset documentation.Connect Superset to the Data Connector
This guide signs in with your own username and password, which is the quickest way to get a first chart on screen.- In ION, go to Data Connector > BI service users and find the Connection details card. Keep it open: you copy four values from it.
- In Superset, go to Settings > Database Connections and select Database to start a new connection.
- Select Snowflake from the Supported databases list.
-
Fill in the form:
- Select Connect.
The form has no schema field, so the Schema value from the Connection details card has nowhere to go here. You set it on each dataset instead.
Create a dataset
A dataset is the query behind a chart. Creating one from the Datasets page only points at whole tables, so anything with a join, a filter, or aGROUP BY starts in SQL Lab.
- In Superset, go to SQL > SQL Lab.
- Select your database, then select the schema, using the Schema value from the Connection details card in ION.
-
Enter a query. This one ranks suppliers by how many open purchase order lines are past due:
- Select Run.
- In the query toolbar, select Save dataset, name the dataset, and save it.
Label the columns
Unquoted names come back in uppercase, so a column you wrote asavg_days_late reads as AVG_DAYS_LATE on every axis and in every menu.
Rather than quoting the names in your query, which forces you to quote every later reference, set a label on each column:
- On the dataset, select Edit.
- On the Columns tab, expand a column and enter a Label, such as
Avg days late. - Repeat for each column you plan to chart, then save.
Build a chart
- In Superset, go to Charts and select Chart to open the chart builder.
- Select your dataset, choose Bar Chart, and select Create new chart.
- In X-axis, add your supplier column.
- In Metrics, add your average-days-late column.
- Select Update chart, then Save.
A metric has to be an aggregate. Your query already returns one row per supplier, so an aggregate such as
MAX returns that row’s value rather than combining rows.Add the chart to a dashboard
- In Superset, go to Dashboards and select Dashboard to create one.
- Name the dashboard.
- Drag your chart from the chart list onto the canvas.
- Select Save.
Troubleshooting
Snowflake isn't offered as a database type
Snowflake isn't offered as a database type
The database picker shows a few types as tiles and keeps the rest in the Supported databases list below them. Select Snowflake from that list.If Snowflake isn’t in the list either, the Snowflake driver isn’t installed in your Superset environment.
Could not connect to Snowflake backend
Could not connect to Snowflake backend
The error names your firewall and allowlist, but the usual cause is the Account value. Remove the
.snowflakecomputing.com suffix from the Server value and try again.Object does not exist on a table you can see
Object does not exist on a table you can see
The query ran without a schema. Select the schema in SQL Lab, or write the table name in full as
database.schema.table.This error reads like a permissions problem, so check the schema before you ask for access.A chart waits a long time on its first load
A chart waits a long time on its first load
The warehouse suspends when it’s idle and resumes on the next query. The first query after a quiet period waits for that, and later queries are faster.