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: website/docs/docs/build/latest-metrics-spec.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,9 @@ The latest Semantic Layer specification creates an open standard for defining me
12
12
With the new spec, you get simpler configuration without losing flexibility, faster onboarding for new contributors, and a clearer path to consistent, governed metrics across your organization.
13
13
14
14
:::info Availability
15
-
The new YAML spec is currently only available in the <Constantname="fusion_engine" />, and will be coming soon to the <Constantname="dbt_platform" /> **Latest** release track and <Constantname="core" /> v1.12 (coming in 1H 2026).
15
+
The new YAML spec is currently only available in the <Constantname="fusion_engine" />, and will be coming soon to the <Constantname="dbt_platform" /> **Latest** release track and <Constantname="core" /> v1.12.
16
+
17
+
For more information about availability, reach out to your account manager or post in the [#dbt-semantic-layer](https://getdbt.slack.com/archives/C046L0VTVR6) channel in the [dbt Community Slack](https://www.getdbt.com/community/join-the-community/).
description: Understand Databricks support for Apache Iceberg.
6
6
---
7
7
8
-
Databricks is built on [Delta Lake](https://docs.databricks.com/aws/en/delta/) and stores data in the [Delta table](https://docs.databricks.com/aws/en/introduction/delta-comparison#delta-tables-default-data-table-architecture) format. Databricks does not support writing to Iceberg catalogs.
9
-
Databricks can create both managed Iceberg tables and Iceberg-compatible Delta tables by storing the table metadata in Iceberg and Delta, readable from external clients. In terms of reading, Unity Catalog does support reading from external Iceberg catalogs.
8
+
import BaseLocationEnvIsolation from '/snippets/_base-location-env-isolation-warning.md';
10
9
11
-
When a dbt model is configured with the table property `UniForm`, it will duplicate the Delta metadata for an Iceberg-compatible metadata. This allows external Iceberg compute engines to read from Unity Catalogs.
10
+
dbt supports materializing Iceberg tables in Unity Catalog using the catalog integration, starting with the dbt-databricks 1.9.0 release, for two Databricks materializations:
To set up Databricks for reading and querying external tables, configure [Lakehouse Federation](https://docs.databricks.com/aws/en/query-federation/) and establish the catalog as a foreign catalog. This will be configured outside of dbt, and once completed, it will be another database you can query.
17
+
Databricks is built on [Delta Lake](https://docs.databricks.com/aws/en/delta/) and stores data in the [Delta table](https://docs.databricks.com/aws/en/introduction/delta-comparison#delta-tables-default-data-table-architecture) format.
18
+
19
+
Databricks supports two methods for creating Iceberg tables in its data catalog, [Unity Catalog](https://docs.databricks.com/aws/en/data-governance/unity-catalog/):
20
+
21
+
- Creating [Unity Catalog managed Iceberg tables](https://docs.databricks.com/aws/en/tables/managed). Databricks Runtime 16.4 LTS and later support this feature.
22
+
- Enabling [Iceberg reads](https://docs.databricks.com/aws/en/delta/uniform) on Delta tables. These tables still use the Delta file format, but generate both Delta and Iceberg-compatible metadata. Databricks Runtime 14.3 LTS and later support this feature.
23
+
24
+
External Iceberg compute engines can read from and write to these Iceberg tables using Unity Catalog's [Iceberg REST API endpoint](https://docs.databricks.com/aws/en/external-access/iceberg). However, Databricks only supports reading from external Iceberg catalogs.
25
+
26
+
To set up Databricks for reading and querying external tables, configure [Lakehouse Federation](https://docs.databricks.com/aws/en/query-federation/) and establish the catalog as a foreign catalog. Configure this outside of dbt. Once completed, it becomes another database you can query.
27
+
28
+
dbt does not yet support enabling [Iceberg v3](https://docs.databricks.com/aws/en/iceberg/iceberg-v3) on managed Iceberg tables.
29
+
30
+
## Creating Iceberg tables
31
+
32
+
To configure dbt models to materialize as Iceberg tables, you can use a catalog integration with `table_format: iceberg` (see [dbt Catalog integration configurations for databricks](#dbt-catalog-integration-configurations-for-databricks)).
33
+
34
+
<VersionBlocklastVersion="1.99">
35
+
dbt supports both creating managed Iceberg tables and Iceberg-enabled Delta tables (formerly [UniForm](https://www.databricks.com/blog/delta-uniform-universal-format-lakehouse-interoperability)). The behavior flag [`use_managed_iceberg`](/reference/global-configs/databricks-changes#use-managed-iceberg) determines whether dbt creates a managed Iceberg table or a Delta table.
36
+
</VersionBlock>
37
+
38
+
<VersionBlockfirstVersion="2.0">
39
+
dbt supports both creating managed Iceberg tables and Iceberg-enabled Delta tables (formerly [UniForm](https://www.databricks.com/blog/delta-uniform-universal-format-lakehouse-interoperability)). The adapter property `use_uniform` (see [Adapter properties](#adapter-properties)) determines whether dbt creates a managed Iceberg table or a Delta table.
40
+
</VersionBlock>
41
+
42
+
### External tables
43
+
44
+
dbt also supports creating externally-managed Iceberg tables using the model configuration [`location_root`](/reference/resource-configs/databricks-configs#configuring-tables). Databricks' DDL for creating tables requires a fully qualified `location`. dbt defines this parameter on the user's behalf to streamline usage and enforce basic isolation of table data:
25
45
26
-
We do not currently support the new Private Priview features of Databricks managed Iceberg tables.
46
+
- When you set a `location_root` string, dbt generates a `location` string of the form: `{{ location_root }}/{{ model_name }}`.
47
+
If you set the configuration option `include_full_name_in_path` to true, dbt generates a `location` string of the form `{{ location_root }}/{{ database_name}}/{{ schema_name }}/{{ model_name }}`.
27
48
49
+
<VersionBlockfirstVersion="2.0">
50
+
In Fusion, dbt also supports setting `location_root` as an [adapter property](#adapter-properties) in `catalogs.yml`.
51
+
</VersionBlock>
28
52
29
-
## dbt Catalog integration configurations for Databricks
53
+
###dbt Catalog integration configurations for Databricks
30
54
31
-
The following table outlines the configuration fields required to set up a catalog integration for [Iceberg compatible tables in Databricks](https://docs.databricks.com/aws/en/delta/uniform).
55
+
<VersionBlocklastVersion="1.99">
56
+
The following table outlines the configuration fields required to set up a catalog integration for [Iceberg compatible tables in Databricks](https://docs.databricks.com/aws/en/iceberg).
32
57
33
58
| Field | Description | Required | Accepted values |
34
59
| :---- | :---- | :---- | :---- |
35
-
| name | Name of the Catalog on Databricks | Yes | “my_unity_catalog” |
36
-
| catalog_type | Type of catalog | Yes | unity, hive_metastore |
37
-
| table_format | Format for tables created by dbt models. | Optional | Automatically set to `iceberg` for `catalog_type=unity`; and `default` for `hive_metastore`. |
38
-
| file_format | Format used for dbt model outputs. | Optional | Defaults to `delta` unless overwritten in Databricks account. |
60
+
|`name`| Name of the catalog on Databricks | Yes | "my_unity_catalog" |
61
+
|`catalog_type`| Type of catalog | Yes | unity, hive_metastore |
62
+
|`table_format`| Format for tables created by dbt models. | Optional | Automatically set to `iceberg` for `catalog_type=unity`, and `default` for `hive_metastore`. |
63
+
|`file_format`| Format used for dbt model outputs. | Optional | Defaults to `delta` unless overwritten in Databricks account. |
64
+
</VersionBlock>
65
+
66
+
<VersionBlockfirstVersion="2.0">
67
+
The following table outlines the configuration fields required to set up a catalog integration for [Iceberg compatible tables in Databricks](https://docs.databricks.com/aws/en/iceberg).
68
+
69
+
| Field | Description | Required | Accepted values |
70
+
| :---- | :---- | :---- | :---- |
71
+
|`name`| Name of catalog integration | Yes | "my_write_integration" |
72
+
|`catalog_type`| Type of catalog | Yes | unity, hive_metastore |
73
+
|`table_format`| Format for tables created by dbt models. | Optional | Automatically set to `iceberg` for `catalog_type=unity`, and `default` for `hive_metastore`. |
74
+
|`file_format`| Format used for dbt model outputs. | Optional | Defaults to `delta` unless overwritten in Databricks account. |
75
+
|`adapter_properties`| Additional configurations unique to Databricks | Optional | See [Adapter properties](#adapter-properties)|
76
+
</VersionBlock>
39
77
40
78
#### Note
41
79
42
80
On Databricks, if a model has `catalog_name=<>` in its model config, the catalog name becomes the catalog part of the model's FQN. For example, if the catalog is named `my_database`, a model with `catalog_name='my_database'` is materialized as `my_database.<schema>.<model>`.
43
81
44
-
### Configure catalog integration for managed Iceberg tables
82
+
<VersionBlockfirstVersion="2.0">
83
+
### Adapter properties
84
+
85
+
These are the additional configurations, unique to Databricks, that you supply and nest under `adapter_properties`. These configurations are specific to Unity Catalog; `adapter_properties` is not allowed for catalog integrations with `catalog_type: hive_metastore`.
86
+
87
+
| Field | Required | Accepted values |
88
+
| --- | --- | --- |
89
+
|`use_uniform`| Optional |`True` or `False`|
90
+
|`location_root`| Optional | "external/location/path"; for example, `"s3://cloud-storage-uri"`|
91
+
92
+
-**use_uniform**: Specifies whether to use managed Iceberg tables or Iceberg-enabled UniForm tables. By default, `use_uniform` is false.
93
+
-**location_root**: Specify an [external location](https://docs.databricks.com/aws/en/sql/language-manual/sql-ref-external-tables) root to write to. dbt writes the table to `<location_root>/<identifier>`, or `<location_root>/<database>/<schema>/<identifier>` if `include_full_name_in_path` is true.
94
+
</VersionBlock>
95
+
96
+
## Configure catalog integration for Iceberg tables
45
97
46
98
1. Create a `catalogs.yml` at the top level of your dbt project (at the same level as dbt_project.yml)<br />
47
99
<br />An example of Unity Catalog as the catalog:
@@ -78,6 +130,3 @@ select * from {{ ref('jaffle_shop_customers') }}
78
130
```
79
131
80
132
3. Execute the dbt model with a `dbt run -s iceberg_model`.
Copy file name to clipboardExpand all lines: website/docs/reference/resource-configs/databricks-configs.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,7 @@ dbt-databricks v1.9 adds support for the `table_format: iceberg` config. Try it
16
16
| table_format | Whether or not to provision [Iceberg](https://docs.databricks.com/en/delta/uniform.html) compatibility for the materialization | Optional | SQL, Python |`iceberg`|
17
17
| file_format <sup>†</sup> | The file format to use when creating tables (`parquet`, `delta`, `hudi`, `csv`, `json`, `text`, `jdbc`, `orc`, `hive` or `libsvm`). | Optional | SQL, Python |`delta`|
18
18
| location_root | The created table uses the specified directory to store its data. The table alias is appended to it. | Optional | SQL, Python |`/mnt/root`|
19
+
| include_full_name_in_path | Whether to use the full table path to qualify the location root. If this is set, the database, schema, and table alias are all appended to the location root. | Optional | SQL, Python |`true`|
19
20
| partition_by | Partition the created table by the specified columns. A directory is created for each partition. | Optional | SQL, Python |`date_day`|
20
21
| liquid_clustered_by<sup>^</sup> | Cluster the created table by the specified columns. Clustering method is based on [Delta's Liquid Clustering feature](https://docs.databricks.com/en/delta/clustering.html). Available since dbt-databricks 1.6.2. | Optional | SQL, Python |`date_day`|
21
22
| auto_liquid_cluster\+| The created table is [automatically clustered by Databricks](https://docs.databricks.com/aws/en/delta/clustering#automatic-liquid-clustering). Available since dbt-databricks 1.10.0 | Optional | SQL, Python |`auto_liquid_cluster: true`|
0 commit comments