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 …
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
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 …
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:
4. Let’s do the same with the STORAGE_USAGE:
6. While you’re on the Error Tracking dashboard:
7. Now go back to the Slowest Running Queries dashboard, navigate to the Slowest N Queries sheet and add a filter for Query ID
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:
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:
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:
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.