Query tags for Databricks SQL are now generally available
Use custom key-value tags on SQL workloads to group, filter, and track costs on warehouses and Lakehouse Real-Time compute.
O que mudou
Query tags allow you to attach custom key-value pairs to SQL workloads in Databricks. This makes it easier to group operations by business context, audit costs per team, and identify long-running queries directly from the system history. ### Use cases Imagine you need to audit how much each department spends on warehouse queries or track which queries originated from a specific dbt model. With tags, you can: - Group queries by team, project, or environment. - Track warehouse costs using custom metadata. - Identify the source of slow queries in the UI or system table. ### How to use You can define tags at the session or statement level using supported connectors or connection parameters. The following example shows how to use the Python connector to set tags in a session. python from databricks import sql import os with sql.connect( server_hostname = os.getenv("DATABRICKS_SERVER_HOSTNAME"), http_path = os.getenv("DATABRICKS_HTTP_PATH"), access_token = os.getenv("DATABRICKS_TOKEN"), query_tags = {"team": "engineering", "dashboard": "abc123"} ) as connection: with connection.cursor() as cursor: cursor.execute("SELECT * FROM samples.nyctaxi.trips LIMIT 10") result = cursor.fetchall() What happens in this code: 1. The connection to Databricks SQL is established using environment variables. 2. The query_tags parameter injects key-value tags into the entire session. 3. The SQL statement executes and automatically inherits the configured tags. ### Limitations and requirements - Stage: Generally Available (GA). - Requirement: Access to the query_tags column in the system.query.history table. - Minimum version requirements for connectors and drivers (e.g., Python SDK 0.86.0 or Python Connector v4.1.3+). - Sensitive data: Because tags are stored as plain text, avoid including passwords or personally identifiable information.
- databricks sql
- query history
- governance
- cost attribution
- dbt
Query tags for SQL warehouses are now generally available
Resumo e explicação gerados por IA a partir da release note oficial. Em caso de dúvida, a documentação oficial da plataforma prevalece.
Relacionadas
- DatabricksGA
Repositórios de pacotes em nível de workspace para Databricks Apps
Administradores de workspace podem configurar repositórios padrão de pacotes Python e npm para Databricks Apps.
databricks apps · workspace settings - DatabricksGA
Redimensione partições de stateful streaming sem perder o checkpoint no Databricks
Agora é possível alterar o número de partições de shuffle em queries Structured Streaming e pipelines Lakeflow sem descartar o estado do checkpoint.
structured streaming · lakeflow - DatabricksAtualização
Google Gemini 4 Argon disponível no Unity Gateway do Databricks
O modelo multimodal Google Gemini 4 Argon já pode ser acessado via Foundation Model APIs e Unity Gateway.
unity catalog · foundation model apis