Overview
Snowsight is Snowflake's new user interface. It brings the power of Snowflake's SQL support into a simple-to-use interface, and has replaced the Classic interface for organisations that signed up from 30 May 2023.
With Snowsight, you can:
- Build and run queries
- Monitor query performance and copy history
- Create and manage users and account permissions
- Create and use virtual warehouses
- Share data with other Snowflake accounts
- Explore listings and share data to the Marketplace
You can share SQL or Python worksheets, and folders of worksheets, with other users who have signed in to Snowsight before. You can also send a link that gives recipients access to the worksheets.
Charts are easy to create from the results of a SQL query, including bar, line, scatterplot, heat grid and scorecard charts. Dashboards hold tiles, each turned into a chart from the results of a SQL query.
Administrators can also monitor the queries that have been run, with metrics such as:
- how long the query took
- the number of rows returned
- when it ran
- how much data the query scans
Practical demo: creating a basic dashboard
The aim of this exercise is to create a basic dashboard. Here's a short video showing how, followed by detailed steps that take you through the process from start to finish.
Creating a dashboard in SnowsightOpens on YouTube in a new tabPrerequisites
Make sure you're logged in to Snowflake and using the Snowsight interface, not the Classic one. There are two ways to do this.
Switch from the Classic interface
While logged in to the Classic console, click the Snowsight icon. You'll be asked to log in again with your Snowflake credentials.
Make Snowsight your default
- In Snowsight, click the drop-down arrow at the top left of the screen, below your initials.
- Click Profile.
- Scroll down and change Default Experience to Snowsight.
- Click Save.
Planning your dashboard
Understand your aim
Before creating a dashboard, be clear on what it's for. Dashboards are built for different reasons, often for meetings or presentations to key stakeholders. The aim is usually to tell a story with the data.
Understand your data
Next, understand the dataset you're working with: what the data represents, how the tables relate to each other, and the key metrics and attributes.
Worksheets and dashboards: the difference
A Snowflake worksheet lets you write and run SQL or Python queries. A dashboard is made up of tiles, each written as a SQL query that outputs a chart. Those charts are then added to the dashboard.
Writing custom SQL queries for your dashboard
This demonstration builds its charts from the queries below, using Snowflake's TPC-H sample data.
Number of customers per nation
SELECT COUNT(DISTINCT c.c_name) "Number of Customers"
,INITCAP(n.n_name) "Nation Name"
FROM SNOWFLAKE_SAMPLE_DATA.TPCH_SF10.CUSTOMER c
INNER JOIN SNOWFLAKE_SAMPLE_DATA.TPCH_SF10.NATION n ON n.n_nationkey = c.c_nationkey
GROUP BY n.n_name;
Customer account balance per nation
SELECT SUM(c.c_acctbal) "Customer Account Balance"
,INITCAP(n.n_name) "Nation Name"
FROM SNOWFLAKE_SAMPLE_DATA.TPCH_SF10.CUSTOMER c
INNER JOIN SNOWFLAKE_SAMPLE_DATA.TPCH_SF10.NATION n ON n.n_nationkey = c.c_nationkey
GROUP BY n.n_name
ORDER BY SUM(c.c_acctbal) desc;
Customer account balance per market segment
SELECT SUM(c.c_acctbal) "Customer Account Balance"
,INITCAP(c.c_mktsegment) "Market Segment"
FROM SNOWFLAKE_SAMPLE_DATA.TPCH_SF10.CUSTOMER c
INNER JOIN SNOWFLAKE_SAMPLE_DATA.TPCH_SF10.NATION n ON n.n_nationkey = c.c_nationkey
GROUP BY c.c_mktsegment
ORDER BY SUM(c.c_acctbal) desc;
Ship mode
SELECT COUNT(o.o_orderkey) "Number Of Orders"
,INITCAP(l.l_shipmode) "Ship Mode"
FROM SNOWFLAKE_SAMPLE_DATA.TPCH_SF10.ORDERS o
INNER JOIN SNOWFLAKE_SAMPLE_DATA.TPCH_SF10.LINEITEM l ON l.l_orderkey = o.o_orderkey
GROUP BY l.l_shipmode;
Top 5 total order value per country
SELECT SUM(o.o_totalprice) "Total Order Price"
,INITCAP(n.n_name) "Nation Name"
FROM SNOWFLAKE_SAMPLE_DATA.TPCH_SF10.ORDERS o
INNER JOIN SNOWFLAKE_SAMPLE_DATA.TPCH_SF10.CUSTOMER c ON c.c_custkey = o.o_custkey
INNER JOIN SNOWFLAKE_SAMPLE_DATA.TPCH_SF10.NATION n ON n.n_nationkey = c.c_nationkey
GROUP BY n.n_name
ORDER BY SUM(o.o_totalprice) desc
LIMIT 5;
Bottom 5 total order value per country
SELECT SUM(o.o_totalprice) "Total Order Price"
,INITCAP(n.n_name) "Nation Name"
FROM SNOWFLAKE_SAMPLE_DATA.TPCH_SF10.ORDERS o
INNER JOIN SNOWFLAKE_SAMPLE_DATA.TPCH_SF10.CUSTOMER c ON c.c_custkey = o.o_custkey
INNER JOIN SNOWFLAKE_SAMPLE_DATA.TPCH_SF10.NATION n ON n.n_nationkey = c.c_nationkey
GROUP BY n.n_name
ORDER BY SUM(o.o_totalprice) asc
LIMIT 5;
Building the charts in Snowsight
- 1Click Dashboards.
- 2Click + Dashboard. A dialog asks you to name the dashboard.
- 3Enter a suitable name and click Create Dashboard.
- 4On the new dashboard, click New Tile, then choose From SQL Worksheet or From Python Worksheet.
- 5The new worksheet opens. It's named after the current date and time by default; you can rename it whenever you like.
- 6Paste in one of the SQL queries you wrote earlier.
- 7Set the worksheet's parameters: a suitable worksheet name, and the database and schema.
- 8Click Run.
- 9When the results appear, click Chart to create and customise your chart.
- 10Click Chart Type and pick a chart that suits your query's results.
- 11Set the other chart options, such as Data, Appearance, Orientation and Labels.
- 12When your chart is ready, click Return to [dashboard name]. Your chart has been added to the dashboard.
- 13Repeat these steps for each query to fill your dashboard with custom charts.
You've now been through the fundamental steps of creating a dashboard of charts that represent your data. Enjoy building your own dashboards to monitor your data.
