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/lakehouse/catalogs/iceberg-catalog.mdx
+64Lines changed: 64 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1794,6 +1794,25 @@ For an Iceberg Database, you must first drop all tables under the database befor
1794
1794
);
1795
1795
```
1796
1796
1797
+
Starting from version 4.1.0, Doris supports specifying sort columns when creating an Iceberg table. When writing data, the data will be sorted according to the specified sort columns to achieve better query performance.
1798
+
1799
+
```sql
1800
+
CREATETABLEordered_table (
1801
+
`id`intNULL,
1802
+
`name`textNULL,
1803
+
`score` double NULL,
1804
+
`create_time` datetimev2(6) NULL
1805
+
)
1806
+
ORDER BY (`id`ASC NULLS FIRST, `score`DESC NULLS LAST)
1807
+
PROPERTIES (
1808
+
"write-format"="parquet",
1809
+
"write.parquet.compression-codec"="zstd"
1810
+
);
1811
+
```
1812
+
1813
+
- If no sort columns are specified, no sorting will be performed during writes.
1814
+
- The default sort order is ASC NULLS FIRST.
1815
+
1797
1816
After creation, you can use the `SHOW CREATE TABLE` command to view the Iceberg table creation statement. For details about partition functions, see the [Partitioning](#) section.
3. The operation will fail if the specified snapshot ID or reference does not exist
2543
2562
4. If the current snapshot is already the target snapshot, the operation returns directly without creating a new snapshot
2544
2563
2564
+
### publish_changes
2565
+
2566
+
The `publish_changes` operation is used in the WAP (Write-Audit-Publish) mode to publish a snapshot with the specified `wap.id` as the current table state.
2567
+
It locates the snapshot whose `wap.id` matches the given `wap_id` and cherry-picks it onto the current table, making the staged data visible to all read operations.
2568
+
2569
+
**Syntax:**
2570
+
2571
+
```sql
2572
+
ALTERTABLE [catalog.][database.]table_name
2573
+
EXECUTE publish_changes("wap_id"="<wap_id>")
2574
+
```
2575
+
2576
+
**Parameters:**
2577
+
2578
+
**Parameters:**
2579
+
2580
+
| Parameter Name | Type | Required | Description |
0 commit comments