Databricks Adds Query Context

Databricks Query Tags add vital context to data warehouse operations, enabling better cost attribution and workload monitoring for teams and applications.

Databricks Query Tags feature graphic
Databricks Query Tags provide essential context for data warehouse operations.
Visual TL;DR
Missing Query ContextDriver
standard query logs lack detail for cost attribution and issue pinpointing
From the article 2 mentionsDatabricks is introducing a new feature called Query Tags, aiming to provide crucial context to data warehouse operations that was previously missing.
Databricks Query TagsCore
attach custom key-value pairs to SQL executions for granular tracking
From the article 9 mentionsBeyond partner tools, Query Tags are valuable for custom applications built on Databricks.
Better Cost AttributionEffect
From the articleQuery Tags enable users to segment shared warehouse costs by team, project, or dashboard, moving beyond simple user-based attribution.
Enhanced Workload TracingEffect
pinpoint specific dashboards or applications causing performance issues
Custom Application ContextEffect
add context for ad-hoc queries and custom application integrations
From the articleBeyond partner tools, Query Tags are valuable for custom applications built on Databricks.
Improved MonitoringEffect
gain deeper insights with system tables and detailed query analysis
Financial AccountabilityOutcome
supports chargeback models and clearer financial responsibility for data usage
From the articleThis is particularly beneficial for chargeback models and financial accountability.
Contents(4)

Databricks is introducing a new feature called Query Tags, aiming to provide crucial context to data warehouse operations that was previously missing. This feature allows users to attach custom key-value pairs to SQL executions, offering a granular way to track and attribute workloads.

StartupHub data

Companies working on this

Profiles of the companies named in this story, with funding and a one-liner from our database.

Databricks
$190.0B
A unified data analytics and AI platform built on the lakehouse architecture.
Power BI
A suite of business analytics tools by Microsoft for data analysis and interactive visualizations.
Tableau
$15M
Interactive data visualization software company focused on business intelligence and analytics for all users.

The core problem Query Tags addresses is the lack of detail in standard query logs. While Databricks SQL logs essential information like who ran a query and from which tool, it often falls short when it comes to attributing costs or pinpointing specific issues. For instance, knowing a slow query originated from Power BI is helpful, but identifying the exact dashboard causing the slowdown requires more context.

Attributing Costs and Tracing Workloads

Query Tags enable users to segment shared warehouse costs by team, project, or dashboard, moving beyond simple user-based attribution. This is particularly beneficial for chargeback models and financial accountability.

The feature also significantly enhances the ability to trace queries originating from third-party tools. Databricks has integrated automatic tagging for popular platforms like dbt, Power BI, and Tableau. For dbt, every query is automatically tagged with model names, core versions, adapter versions, and materialization types, simplifying the identification of performance regressions. ASOS engineering leads Dipesh Bhundia and Dave Couse noted that this allows them to "accurately split up warehouse costs by the teams that are running dbt on it."

Power BI and Tableau support custom tags at the connection level, meaning once configured, all subsequent queries from that connection inherit the tags automatically. This ensures that even if a workbook is renamed in Tableau, its attribution is preserved.

Context for Custom Applications and Ad-Hoc Work

Beyond partner tools, Query Tags are valuable for custom applications built on Databricks. Developers can attach metadata such as `customerid`, `applicationname`, or `app_version` directly to queries executed via APIs or connectors. This transforms what would otherwise be anonymous API calls into traceable workloads.

Unit21 DevOps Engineer Matthew Haber shared how Query Tags helped them maintain visibility after consolidating warehouses: "With Query Tags, we just pass the team name from our Databricks SQL Connector for Python workloads and we have that attribution back, no need to split warehouses again."

Analysts performing ad-hoc work also benefit. Queries run in the SQL Editor, Notebooks, or Dashboards can be tagged with dimensions like 'dev vs. prod', 'cost center', or 'experiment name', making it easier to manage and analyze diverse workloads without annotating every single query individually.

Monitoring and Analysis with System Tables

Once queries are tagged, this metadata is stored in the `query_tags` column of the Query History System Table. This opens up powerful analytical possibilities using standard SQL or natural language queries via Genie. Users can now easily answer complex questions like which dbt model introduced a regression or which team is driving warehouse costs. Databricks is also working on bringing searchability to the Query History UI and extending Query Tags to Serverless Notebooks and Jobs.

Query Tags are currently in Public Preview for SQL Warehouses.

© 2026 StartupHub.ai. All rights reserved. You may not republish this article in full without a license. Search engines and AI research tools may crawl and summarize for reference. Bulk reproduction or model training requires a license. See our terms.
Daniel Singer

Written by

Daniel Singer

Editor, StartupHub.ai

Daniel Singer is the editor of StartupHub.ai, a technology expert and thought leader on AI and its applications across sectors, from fintech and healthcare to developer tooling and consumer software. He writes and tests the tools covered here thoroughly and regularly, and built StartupHub.ai to give founders, operators and buyers a clearer read on what they are actually being sold.

More from Daniel Singer