Skip to content

Commit 0b118a6

Browse files
authored
Merge branch 'current' into nfiann-editing
2 parents 774852f + 9a28e15 commit 0b118a6

File tree

3 files changed

+77
-25
lines changed

3 files changed

+77
-25
lines changed

website/docs/docs/build/latest-metrics-spec.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ The latest Semantic Layer specification creates an open standard for defining me
1212
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.
1313

1414
:::info Availability
15-
The new YAML spec is currently only available in the <Constant name="fusion_engine" />, and will be coming soon to the <Constant name="dbt_platform" /> **Latest** release track and <Constant name="core" /> v1.12 (coming in 1H 2026).
15+
The new YAML spec is currently only available in the <Constant name="fusion_engine" />, and will be coming soon to the <Constant name="dbt_platform" /> **Latest** release track and <Constant name="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/).
1618
:::
1719

1820
## Changes in the latest spec

website/docs/docs/mesh/iceberg/databricks-iceberg-support.md

Lines changed: 73 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,43 +5,95 @@ sidebar_label: "Databricks Iceberg support"
55
description: Understand Databricks support for Apache Iceberg.
66
---
77

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';
109

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:
1211

13-
Example SQL:
12+
- [Table](/docs/build/materializations#table)
13+
- [Incremental](/docs/build/materializations#incremental)
1414

15-
```sql
16-
{{ config(
17-
tblproperties={
18-
'delta.enableIcebergCompatV2': 'true'
19-
'delta.universalFormat.enabledFormats': 'iceberg'
20-
}
21-
) }}
15+
## Databricks Iceberg tables
2216

23-
```
24-
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+
<VersionBlock lastVersion="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+
<VersionBlock firstVersion="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:
2545

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 }}`.
2748

49+
<VersionBlock firstVersion="2.0">
50+
In Fusion, dbt also supports setting `location_root` as an [adapter property](#adapter-properties) in `catalogs.yml`.
51+
</VersionBlock>
2852

29-
## dbt Catalog integration configurations for Databricks
53+
### dbt Catalog integration configurations for Databricks
3054

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+
<VersionBlock lastVersion="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).
3257

3358
| Field | Description | Required | Accepted values |
3459
| :---- | :---- | :---- | :---- |
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+
<VersionBlock firstVersion="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>
3977

4078
#### Note
4179

4280
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>`.
4381

44-
### Configure catalog integration for managed Iceberg tables
82+
<VersionBlock firstVersion="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
4597

4698
1. Create a `catalogs.yml` at the top level of your dbt project (at the same level as dbt_project.yml)<br />
4799
<br />An example of Unity Catalog as the catalog:
@@ -78,6 +130,3 @@ select * from {{ ref('jaffle_shop_customers') }}
78130
```
79131

80132
3. Execute the dbt model with a `dbt run -s iceberg_model`.
81-
82-
83-

website/docs/reference/resource-configs/databricks-configs.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ dbt-databricks v1.9 adds support for the `table_format: iceberg` config. Try it
1616
| table_format | Whether or not to provision [Iceberg](https://docs.databricks.com/en/delta/uniform.html) compatibility for the materialization | Optional | SQL, Python | `iceberg` |
1717
| 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` |
1818
| 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` |
1920
| partition_by | Partition the created table by the specified columns. A directory is created for each partition. | Optional | SQL, Python | `date_day` |
2021
| 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` |
2122
| 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

Comments
 (0)