By Deiby Gómez
Cloud-based data warehousing platforms like Snowflake have changed the way organizations store, manage, and analyze their data. But with this power and flexibility comes the challenge of managing costs, especially when it comes to Snowflake credit consumption. Snowflake’s pricing model can lead to unexpected expenses if credit usage is not monitored and managed carefully.
This article focuses on a crucial aspect of cost management: analyzing credit consumption in Snowflake. We’ll use detailed line and bar charts to visualize credit usage across various Snowflake services and warehouses. By breaking down credit consumption into these visual components, we’ll give you a clear understanding of how and when credits are being used.
The goal is to highlight patterns and identify critical periods of high credit usage. With these insights, you’ll be able to make informed decisions about resource allocation, optimize your Snowflake environment, and implement strategies to reduce your overall Snowflake costs. Whether you’re managing a single warehouse or multiple Snowflake services, this guide offers practical tools and actionable insights to help you control costs and improve efficiency.
For this article, I will use the Prismafy tool for Snowflake, which generates reports that helps us identify this information in just a couple of minutes. The tool is free to use and supports external authentication, including username/password and MFA for connecting to Snowflake.
You can read more about Prismafy in the documentation.
What’s Prismafy?
Prismafy is an open-source tool developed in Python to analyze metadata for cloud-native data platforms. It provides charts and insights allowing you to quickly detect and resolve issues.
How to use Prismafy to Analyze a Specific Query
Follow these three steps:
- Download Prismafy: https://github.com/prismafy/prismafy
- Run Prismafy and specify only the “Security” Section:
python prismafy.py -d snowflake -t password -a abc.us-east-2.aws -w Prismafy_wh -u Prismafy_user -m 6 -r Prismafy_role –s C
NOTE: Section “C” is for credits analysis.
- Open the “prismafy-reports/prismafy-<date>/prismafy_index.html” report.
From the Index report you can access the following reports:
- Credits consumption in the Snowflake account
- Credits consumption by Snowflake service
- Credits consumption by warehouse
Report for Credits Consumption in the Snowflake account
In this report, you can get an overall view of how your credit is being spent over time. You can identify periods when Snowflake consumed a high amount of credit, which is important for optimizing costs. For example, starting on May 13th, there was a significant increase in credit usage.
Report for Credits Consumption by Snowflake Service
After analyzing the behavior of the general credits spent for your Snowflake account, it’s time to identify which Snowflake service is the most problematic in terms of credits. This report will tell you:
Prismafy also provides the following chart where you can identify those times where the problematic Snowflake service is spending more credits:
Report for Credits Consumption by Warehouse
Since the warehouse is identified as the primary consumer of credits, the next step is to analyze which warehouse consumes the most credit. This report allows you to quickly identify how credits are consumed per warehouse. For example, the chart shows that the warehouse named ‘DBT_PROD_WH’ is the primary consumer.
Now that we have identified the most problematic warehouse, we can use the following chart to identify wjem the warehouse “DBT_PROD_WH” is spending more credits than normal. Again, it looks like the warehouse “DBT_PROD_WH” had a significant change on May 13th.
Effectively managing credit consumption is essential for maintaining control over your Snowflake expenses and ensuring that you maximize the value of your cloud data warehousing investment. In this article, we used line and bar charts to provide a detailed analysis of credit usage across different Snowflake services and warehouses. These visualizations uncover trends and identify peak usage periods that directly impact your billing.
By leveraging insights from these charts, you can better recognize and address periods of high credit consumption. Implementing the strategies based on this analysis will help you to streamline your Snowflake environment and reduce your overall costs.
Proactive monitoring and detailed analysis of credit usage are key to effective cost management in Snowflake. With the tools and knowledge provided in this article, you can make data-driven decisions to improve cost control, ensure efficient use of resources, and achieve greater financial sustainability for your data operations.
Helpful Resources
- The Definitive Guide to Analyzing Queries in Snowflake
- How to Detect Query Profile Changes in Snowflake
- How to Analyze a Warehouse in Snowflake and Reduce Credit Waste
- Snowflake-related blogs
- Snowflake Developer Resources
Ready to unlock the full potential of your data? Our experts are here to help. Send us a message and see how we can transform your data into actionable insights.
Deiby Gómez was the first Oracle ACE Director of Guatemala (2015-2023). He holds 35 technology certifications, including the highest certifications for Oracle Database (Oracle Certified Master, OCM) and 3 Advanced Snowflake Certifications (Architect, Administrator, and Data Engineer). An engineer with 2 master’s degrees and a future lawyer, Deiby has been a speaker at technology events in more than 12 countries, including Oracle Open World in San Francisco, USA. He is the technical reviewer of the book Oracle Database 12cR2 Multitenant – Oracle Press and co-author of the book Oracle Database 12cR2 Testing Tools and Techniques for Performance and Scalability – Oracle Press.