Skip to content

Commit 1126e17

Browse files
authored
Unity Catalog config for predictive optimization (#1333)
1 parent 5d44396 commit 1126e17

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

modules/manage/pages/iceberg/iceberg-topics-databricks-unity.adoc

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,23 @@ endif::[]
2323
* A Databricks workspace in the same region as your S3 bucket. See the https://docs.databricks.com/aws/en/resources/supported-regions#supported-regions-list[list of supported AWS regions^].
2424
* Unity Catalog enabled in your Databricks workspace. See the https://docs.databricks.com/aws/en/data-governance/unity-catalog/get-started[Databricks documentation^] to set up Unity Catalog for your workspace.
2525
* https://docs.databricks.com/aws/en/optimizations/predictive-optimization#enable-predictive-optimization[Predictive optimization^] enabled for Unity Catalog.
26+
+
27+
[NOTE]
28+
====
29+
When you enable predictive optimization, you must also set the following configurations in your Databricks workspace. These configurations allow predictive optimization to automatically generate column statistics and carry out background compaction for Iceberg tables:
30+
31+
```sql
32+
SET spark.databricks.delta.liquid.lazyClustering.backfillStats=true;
33+
SET spark.databricks.delta.computeStats.autoConflictResolution=true;
34+
35+
/*
36+
After setting these configurations, you can optionally run OPTIMIZE to
37+
immediately trigger compaction and liquid clustering, or let predictive
38+
optimization handle it automatically later.
39+
*/
40+
OPTIMIZE `<catalog-name>`.redpanda.`<table-name>`;
41+
```
42+
====
2643
* https://docs.databricks.com/aws/en/external-access/admin[External data access^] enabled in your metastore.
2744
* Workspace admin privileges to complete the steps to create a Unity Catalog storage credential and external location that connects your cluster's Tiered Storage bucket to Databricks.
2845

@@ -189,7 +206,7 @@ The following example shows how to query the Iceberg table using SQL in Databric
189206
[,sql]
190207
----
191208
-- Ensure that the catalog and table name are correctly parsed in case they contain special characters
192-
SELECT * FROM `<catalog-name>`.redpanda.`<table-name>`;
209+
SELECT * FROM `<catalog-name>`.redpanda.`<table-name>` LIMIT 10;
193210
----
194211
+
195212
Your query results should look like the following:

0 commit comments

Comments
 (0)