
Asynchronous Processing in Snowflake Scripting: A Practical Guide
November 27, 2025
What Is Conversational Analytics — and Why It’s Replacing Dashboards
January 7, 2026Snowflake Query Tagging Best Practices
Efficient data operations require full visibility into how queries run, who triggers them, and which workloads consume the most compute. As enterprises scale on the Snowflake AI Data Cloud, implementing Query Tagging has become one of the simplest yet most powerful ways to optimize warehouses, streamline reporting, and monitor dashboard performance.
In this guide, we cover the purpose of query tags, why they matter, best practices to follow, and how Infometry helps enterprises get maximum value from Snowflake through advanced optimization strategies.
What Is Query Tagging in Snowflake?
Query tagging allows you to attach metadata to SQL queries, sessions, users, and accounts. These tags appear in the QUERY_HISTORY views, enabling teams to track usage and analyze trends across dashboards, pipelines, and workloads.
You can apply QUERY_TAG at:
- Account level
- User level
- Session level
- Individual queries
Precedence Rule
If multiple Query Tags exist, Snowflake uses this order of precedence:
Session > User > Account
This ensures workloads are categorized at the most granular level.
Why Query Tagging Matters in the Snowflake AI Data Cloud
1. Boost Warehouse Optimization
Tags reveal which workloads consume the most compute, helping teams tune auto-scaling and right-size warehouses.
2. Track BI Reports & Dashboards
Monitor which dashboards cause high load, run too frequently, or slow down user performance.
3. Improve Cost Visibility & Chargeback
Assign tags to departments, apps, or teams to improve financial governance.
4. Strengthen Observability for AI & Data Pipelines
AI workloads depend on traceability, lineage, and precise cost/performance monitoring.
5. Faster Troubleshooting
Tags help quickly pinpoint root causes behind performance drops.
How to Apply Query Tags in Snowflake
Setting a Query Tag at the Account Level
ALTER ACCOUNT SET QUERY_TAG = ‘global_governance’;
Setting a Query Tag at the User Level
ALTER USER finance_analyst SET QUERY_TAG = ‘dept_finance’;
Setting a Query Tag at the Session Level
(Session overrides user and account tags)
ALTER SESSION SET QUERY_TAG = ‘tableau_sales_dashboard’;
Tagging Individual Queries
SELECT /* QUERY_TAG=’etl_customer_merge’ */
*
FROM customer_data;
Query Tag Cannot Be Set on Warehouses
Snowflake does not support setting QUERY_TAG on a warehouse using ALTER WAREHOUSE.
Instead, you can attach object tags to warehouses using standard Snowflake tagging:
Correct Syntax for Warehouse Object Tagging
ALTER WAREHOUSE wh_etl
SET TAG data_domain = ‘finance’;
This is not the same as QUERY_TAG — it applies metadata to the warehouse object, not to the queries it runs.
Best Practices for Snowflake Query Tagging
1. Use a Consistent Naming Convention
Clear and descriptive tags make analysis easier.
Examples:
- etl_customer_merge
- finance_q4_analysis
- tableau_sales_dashboard
2. Tag Dashboards & BI Tools Automatically
Use built-in mechanisms from:
- Tableau
- Power BI
- Sigma
- Looker
- ThoughtSpot
These tools automatically pass workbook, user, or dashboard identifiers as query tags.
3. Tag Critical Pipelines for AI & ML
Examples:
- ml_feature_store_refresh
- ai_scoring_pipeline
AI-heavy workloads need more granular tracking.
4. Use Tags for Cost Allocation
Assign tags by department, app, or business unit.
5. Tag Long-Running or High-Risk Processes
Helps track expensive ELT tasks or unpredictable data operations.
6. Review QUERY_HISTORY Regularly
Combine tags with performance analysis for observability and optimization.
How Query Tagging Helps Optimize Warehouses
Query tags allow teams to answer:
- Which queries trigger warehouse scaling or spikes?
- Which departments generate the most cost?
- Are dashboards running too frequently?
- Are ETL pipelines optimal or wasteful?
With these insights, teams can:
- Right-size warehouses
- Avoid unnecessary multi-cluster scaling
- Improve dashboard performance
- Reduce overall Snowflake cost
Infometry’s Expertise in Snowflake Optimization
As a trusted Snowflake migration and AI Data Cloud partner, Infometry helps enterprises:
- Implement robust query tagging frameworks
- Optimize warehouses for cost and performance
- Improve BI and dashboard observability
- Modernize ETL/ELT pipelines
- Build AI-ready, scalable data architectures
- Strengthen Snowflake governance and monitoring
- Automate tagging using No-Code/Low-Code tools
With deep experience across industries, Infometry enables organizations to maximize ROI on their Snowflake investment.
Conclusion
Query tagging is a simple yet critical capability in Snowflake. When applied correctly across accounts, users, sessions, and queries, it strengthens observability, improves cost governance, and optimizes performance across BI, ETL, and AI workloads.
With Infometry’s Snowflake expertise, enterprises can adopt tagging best practices, streamline reporting, and fully leverage the power of the Snowflake AI Data Cloud.





