Calculating Snowflake Compute Costs for Your Customers

Step 1: Grab the dbt model on Github (models, query_history_enriched.sql) or use the equivalent sql query.

Step 2: Get the dbt model up and running or input sql in Sigma.

Step 3: Leverage the Sigma workbook template with visualizations that run off the query_history_enriched based on the model

Step 4: Parse out email domain to compute cost per client

Pro-Tip: Ask your Sigma Account Executive or CSM for the Sigma workbook template. It can be shared with you using Org to Org sharing.

query_history_enriched.sql.docx (23.5 KB)

I’ve seen the following formula used in workbooks to isolate the workbook names from the resulting dataset FYI!

Trim(RegexpReplace(RegexpReplace(SplitPart(SplitPart([Sigma sourceUrl], “/”, 6), “?”, 1), Right(SplitPart(SplitPart([Sigma sourceUrl], “/”, 6), “?”, 1), 22), “”), “-”, " "))