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.
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.