In this post I will explain how to connect Tableau to your Snowflake Account in order to access a table provided by Snowflake with metadata and usage metrics for your Account.
Tableau has a lot of connection options, if you click the Snowflake one, the next window will pop up so you can add your server details.
![](https://www.thedataschool.co.uk/content/images/2021/05/image-53.png)
![](https://www.thedataschool.co.uk/content/images/2021/05/image-59.png)
SNOWFLAKE is a system-defined, read-only shared database, provided by Snowflake. The database is automatically imported into each account from a share named ACCOUNT_USAGE. read more here: https://docs.snowflake.com/en/sql-reference/account-usage.html#what-is-the-snowflake-database
The SNOWFLAKE database contains two schemas (read-only) and each schema contains a set of views:
ACCOUNT_USAGE contains Views that display object metadata and usage metrics for your account.
![](https://www.thedataschool.co.uk/content/images/2021/05/image-56.png)
There are different tables you can connect to:
![](https://www.thedataschool.co.uk/content/images/2021/05/image-60.png)
- The Table: QUERY_HISTORY allows you to analyze and explore the number of queries per database, schema or warehouse, and you can use that information to create a dashboard for Snowflake utilization.
- The Table: WAREHOUSE_METERING_HISTORY can be used to return the hourly credit usage for a warehouse (or all the warehouses in your account) within the last 365 days.
![](https://www.thedataschool.co.uk/content/images/2021/05/image-61.png)
- The Table: STORAGE_USAGE displays the average daily data storage usage, in bytes, within the last 365 days (1 year) across the entire account.
By connecting to these tables you can create views and dashboards that will help you understand and answer questions like: How many credits are you spending? how many different users do you have on a particular database?