DeltaLake.Table
A Delta table read from its folder: the rows of its latest version, typed as Power BI types Delta's columns.
Group: Databases and lakes. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
DeltaLake.Table(directory as table, optional options as nullable record) as table
| Parameter | Type | Description |
|---|---|---|
directory | table | A listing of the table's folder, as Folder.Contents gives it (or a folder's Content in such a listing). |
options | nullable record optional | ColumnMappingMode, Compression, MaxDepth, PreserveOrder or UseStatistics; any other is an error. |
Returns
table. The table as it is now.
Remarks
- The folder is the one whose listing has the _delta_log row. A listing without it, or one of
Folder.Files(files only), is a DataFormat.Error that says no valid Delta table is there. - Delta's long, integer, short and byte are Int64.Type, Int32.Type, Int16.Type and Int8.Type; double is Double.Type and float Single.Type; decimal is Decimal.Type; a date is a date and a timestamp comes as a datetime of its UTC time; strings are text and booleans logical. A partition's column comes from its folders' names.
- Rows come in no promised order: sort them when the order matters.
- DuckDB reads the table, so the steps after it fold into the read.
Value.Versionslists its versions, each with its Data. - It needs DuckDB's delta extension on the computer. On OpenBI Server it is set up under Admin › Lakes › Set up lakes, by the administrator.
Examples
A Delta table, sorted
Two versions wrote it: three orders, then two more appended.
Table.Sort(DeltaLake.Table(Folder.Contents("C:\Data\orders-delta")), {"OrderId"})
| OrderId | Shop | Product | OrderDate | Amount |
|---|---|---|---|---|
| 1001 | Oslo | Chair | 2026-01-05 | 120 |
| 1002 | Bergen | Desk | 2026-01-12 | 250 |
| 1003 | Oslo | Lamp | 2026-02-03 | 45.5 |
| 1004 | Trondheim | Chair | 2026-02-17 | 120 |
| 1005 | Bergen | Lamp | 2026-03-02 | 45.5 |
Its columns' types
Table.Schema(DeltaLake.Table(Folder.Contents("C:\Data\orders-delta")))[[Name], [TypeName]]
| Name | TypeName |
|---|---|
| OrderId | Int64.Type |
| Shop | Text.Type |
| Product | Text.Type |
| OrderDate | Date.Type |
| Amount | Double.Type |
An option it doesn't know
DeltaLake.Table(Folder.Contents("C:\Data\orders-delta"), [Nonsense = 1])
Result: an error.
[Reason = "Expression.Error", Message = "'Nonsense' isn't a valid DeltaLake.Table option. Valid options are:#(cr,lf)ColumnMappingMode, Compression, MaxDepth, PreserveOrder, UseStatistics", Detail = null]
Related functions
Folder.Contents, Value.Versions, Parquet.Document, OpenBI.Lake, Table.Sort.