You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/integrations/engines/databricks.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -271,6 +271,28 @@ The only relevant SQLMesh configuration parameter is the optional `catalog` para
271
271
|`disable_databricks_connect`| When running locally, disable the use of Databricks Connect for all model operations (so use SQL Connector for all models) | bool | N |
272
272
|`disable_spark_session`| Do not use SparkSession if it is available (like when running in a notebook). | bool | N |
273
273
274
+
### Query tags
275
+
276
+
Databricks SQL Connector supports per-query tags through the `query_tags` model session property. Specify tags as a `MAP(...)` of string keys to string or `NULL` values:
277
+
278
+
```sql
279
+
MODEL (
280
+
name sqlmesh_example.tagged_model,
281
+
dialect databricks,
282
+
session_properties (
283
+
query_tags = MAP(
284
+
'team', 'data-eng',
285
+
'app', 'sqlmesh',
286
+
'feature', NULL
287
+
)
288
+
)
289
+
);
290
+
291
+
SELECT1AS id;
292
+
```
293
+
294
+
Query tags are only applied when SQLMesh executes SQL through the Databricks SQL Connector. They are not applied when SQLMesh routes execution through Databricks Connect, a Databricks notebook SparkSession, or the Spark engine adapter.
295
+
274
296
## Model table properties to support altering tables
275
297
276
298
If you are making a change to the structure of a table that is [forward only](../../guides/incremental_time.md#forward-only-models), then you may need to add the following to your model's `physical_properties`:
0 commit comments