A quick intro

Snowflake has been around for a number of years now, it’s an awesome cloud-hosted database that works very easily with Tableau.  I have several clients that use the Snowflake-Tableau combination (usually with software like Alteryx or Hevo to load the data in to Snowflake) and then perform transformations on the data (Alteryx or dbt) to prepare the data for consumption in Tableau.

Snowflake’s costing model is pretty unique as well – you pay for storage (this is the data that you save “on disk”) and compute (when you’re “doing something” with the data) separately.  So there’s always a balance of how do you store the data and how do you process the data in order to keep your Snowflake costs as low as possible but still perform the daily operations.  With Snowflake you can instantly scale your compute resources up & down – either manually or automatically (as the load increases or decreases) and you can also configure “auto-suspend” to stop the compute resources when they are no longer required … and yes, they can auto-resume as soon as you start querying the database again.

If you’re not using Snowflake, imagine that your database engine went into “sleep mode” when it wasn’t being used – which effectively means that you don’t pay for the compute until you need it again in the future.  That could mean that every night and every weekend you don’t pay for the compute because you don’t need it.  You still pay for storage obviously, but I’ll address that in a later blog post.

So we’ve established that Snowflake can be very run at a very low cost.  It can also cost a LOT if it’s configured or used the wrong way.  A Snowflake trial account consists of $400 USD OR 30 days (whichever comes first) and I’ve done a complete setup for some clients in less than 30 days using about $100 USD of credit.  I’ve also seen clients use almost $400 USD in less than 8 hrs – by simply using Snowflake the wrong way, so cost is important to monitor and track.

It might sound bad, but there’s some good news as well …

Let's get down to business

It feels like a very short time ago, (but it’s obviously longer than I was thinking) Kelly Hotta (at the time she was with Snowflake after some amazing years at Tableau) created a Tableau workbook that was a great help in visualising your Snowflake costs. In May 2019, Scott Smith (Tableau) updated the workbook and published a blog post here.

But time moves on and things change and Tableau internal logic has changed enough so that the workbook doesn’t quite as easily as it used to. I’m going to assume that you’ve completed Part One: Enable access in Snowflake, Part Two: Open Tableau’s Account Usage dashboards and Part Three: Direct the workbook to your Snowflake Data Warehouse in the blog and now you’re at the point where you’re connected to your Snowflake account and most of the dashboards don’t work.

Just before I start, I’m currently using Tableau Desktop 2022.2.1 on Windows 11 (yes I know, not an approved operating system, but this is a fairly new laptop and I haven’t had any issues so far).

In order to make the workbook function properly, you need to do these steps:

1. Save the workbook NOW!

2. In the QUERY_HISTORY data source, let’s create a calculated field.  Name it No of Records (or something else that you’ll remember for later) and define it just like this – yes, just a 1 and that’s all – no quotes, no brackets, just a 1

2022-12-24 17_30_44-Tableau - Snowflake Account Usage Dashboards (blog)

2. A lot of the issues are simple changes to field names (maybe data types), so we’ll use Replace References a lot.  The easiest way to replace references is to right-click (or click on the menu arrow) on the appropriate field in the Data Pane and choose Replace References …

2022-12-24 17_12_02-Tableau - Snowflake Account Usage Dashboards (blog)

To get to this dialog box where you choose the new field to use instead of the old one

3. Working with the QUERY_HISTORY data source, use Replace References on these fields:

  •  click on Error Code (1) and replace with Error Code
  • click on Queued Overload Time (ms) and replace with Queued Overload Time
  • click on Queued Provision Time (ms) and replace with Queued Provision Time
  • click on Queued Repair Time (ms) and replace with Queued Repair Time
  • click on Transaction Blocked Time (ms) and replace with Transaction Blocked Time 
  • click on Number of Records and replace with No of Records (or whatever you called it at Step 2)

4. Let’s do the same with the STORAGE_USAGE:

  • click on Failsafe Bytes (1) and replace with Failsafe Bytes
  • click on Stage Bytes (1) and replace with Stage Bytes 
5. Now let’s concentrate on the sheets, go to:
  •  Compute Cost Overview dashboard
    • Compute Spend This Month sheet
      • edit the Start Time filter and uncheck the ‘Anchor relative to’ checkbox
2022-12-24 17_46_12-Tableau - Snowflake Account Usage Dashboards (blog)
Go back to the dashboard:
  •  Compute Cost Overview dashboard
    • Compute Spend Last Month sheet
      • edit the Start Time filter and uncheck the checkbox (as above)
  • Storage Cost dashboard
    •  Usage Date sheet
      • edit the Usage Date filter and uncheck the checkbox (as above)
  • Storage Cost dashboard
    • Storage Cost Last Month sheet
      • edit the Usage Date filter and uncheck the checkbox (as above)
  • Snowflake Query Utilization dashboard
    • Total Queries sheet
      • edit the Start Time filter and uncheck the checkbox (as above)
  • User Adoption dashboard
    • Total Queries (2) sheet
      • edit the Start Time filter and uncheck the checkbox (as above)
  • Performance Monitoring dashboard
    • Total Queries (Perf) sheet
      • edit the Start Time filter and uncheck the checkbox (as above)
  • Slowest Running Queries dashboard
    • Slow Running Queries sheet
      • edit the Start Time filter and uncheck the checkbox (as above)
  • Error Tracking dashboard
    • Errors Over Time sheet
      • edit the Start Time filter and uncheck the checkbox (as above)

6. While you’re on the Error Tracking dashboard:

  • go to Common Error Codes sheet and change the sort order to Descending
  • go to Common Error Messages sheet and change the sort order to Descending

7. Now go back to the Slowest Running Queries dashboard, navigate to the Slowest N Queries sheet and add a filter for Query ID

2022-12-24 18_11_35-Tableau - Snowflake Account Usage Dashboards (blog)

On the General tab, make sure you choose Use All, then on the Top tab make the appropriate changes to use the parameter.

8. On the User Adoption dashboard, there’s 2 sheets with the same problem for the tooltip – the viz in tooltip is not working properly.  The sheets are:

  • Users Per Warehouse
  • Users Per Database


Simply remove the viz code from the tooltip and re-insert the ‘Viz In Toolip – Specific Users’ sheet and change the maxheight to 600 so it looks like this:

2022-12-24 18_27_33-Tableau - Snowflake Account Usage Dashboards (blog)


That’s all you need to do, but you might want to change the layout a bit and definitely check that your Compute Cost per Credit is correct on the Compute Cost Overview dashboard.

Now delete that sheet that you created in Part 3, save the workbook and start analysing your Snowflake usage better.

OK, if you want to be really picky (I’ll leave the American spelling in place), I would also change:

  • Snowflake Query Utilization dashboard, Queries by Datebase sheet … should be Queries by Database
  • Slowest Running Queries, top left textbox change optized to optimized


I haven’t looked into all the calculations used, but they are “pretty close” to real Snowflake invoices that I’ve seen.

If I’ve missed anything, please let me know and I will be happy to make the change and credit you.

Leave a Reply

Your email address will not be published. Required fields are marked *