Blog

Dec
03
Creating Usage Dashboards with Snowsight

One of the challenges that many Snowflake administrators face is the daily monitoring of user and resource activity in their environment. The advantages of Snowflake's consumption-based pricing model (instantly-scalable compute sizing, usage-focused scheduling, etc.) are best employed when compute and storage activity is transparent to the business. Snowflake includes an ACCOUNT_USAGE view-based schema in the out-of-the-box Snowflake database than contains all the information related to account activity. This data can, of course, be directly queried like any other data, but wouldn't it be nice to have a single view of key metrics around data storage and activity that can be monitored day to day? In other words, a Snowflake usage dashboard.


This can now be done within Snowflake via Snowsight. Snowsight is the new user interface for Snowflake, and within Snowsight is the ability to visualize data and create persistent, sharable dashboards. Additionally, all other elements of the “default” Snowflake interface (e.g. Worksheets, History, etc.) can be found within Snowsight in a simpler, cleaner format.


You can open the Snowsight interface by clicking the Snowsight icon in the upper right of the standard Snowflake console:



temp-post-image

A menu on the Snowsight interface connects you to worksheets, databases, compute resources (I.e. Warehouses), etc. Note that there is also a spot for Dashboards.




temp-post-image

For example, say you want to build out a dashboard which returns the number of jobs run for each database for the current month.



Create a new Worksheet by clicking on the add worksheet button in the upper right corner of the screen.



temp-post-image

From the newly created worksheet select the SNOWFLAKE database and the ACCOUNT_USAGE schema.


temp-post-image

Type up the SQL




temp-post-image












Then simply run the query for the results.



temp-post-image

As long as you have at least one each of an aggregate value and a dimension (here it’s the count of jobs and the database name), you can create a two-dimensional chart. Writing and running this query into a new worksheet produces the standard snowflake tabular results, but note that there is also an option to display as a chart:


temp-post-image

By default, the chart will display as a line graph but you can change the chart type (along with other settings) in the control panel that appears on the right side of the screen.




temp-post-image

Once the chart is set up as you want it, add it to a new dashboard. If you select the name of the worksheet in the upper left corner, then select Move to and New dashboard, a new dashboard will be created with your new graph as a single “tile”.




temp-post-image

Note that you can no longer edit the worksheet from the Worksheet menu; rather, each tile on a dashboard has its own edit menu (from the 3 dots in the upper right). New queries and charts can then be created from new worksheets, then added to the existing dashboard as additional tiles.



temp-post-image

Finally, you can Share the completed dashboard with other users. Clicking the Share button in the upper right corner allows you to add individual user names and grant view capability (note that the users must have SYSADMIN rights). The dashboard will now appear in their Dashboards menu list within Snowsight.




With a usage monitoring dashboard in place and visible to key administrative users, close oversight of your Snowflake environment is easier than ever. The depth and breadth of data in ACCOUNT_USAGE (along with sample queries) can be found in the Snowflake documentation here. Just about any aspect of Snowflake account administration can be visualized and shared via a Snowsight dashboard, bringing further value from your Snowflake data cloud.


Pandata GroupLess

Chicago

WeWork/ Fulton Market

220 N. Green Street

Second Floor

Chicago, IL 60607

Madison

316 W Washington Ave

Suite 525

Madison, Wisconsin 53703

Send Message