OpenBI Docs Buy

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
ParameterTypeDescription
directorytableA listing of the table's folder, as Folder.Contents gives it (or a folder's Content in such a listing).
optionsnullable 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.Versions lists 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"})
OrderIdShopProductOrderDateAmount
1001OsloChair2026-01-05120
1002BergenDesk2026-01-12250
1003OsloLamp2026-02-0345.5
1004TrondheimChair2026-02-17120
1005BergenLamp2026-03-0245.5

Its columns' types

Table.Schema(DeltaLake.Table(Folder.Contents("C:\Data\orders-delta")))[[Name], [TypeName]]
NameTypeName
OrderIdInt64.Type
ShopText.Type
ProductText.Type
OrderDateDate.Type
AmountDouble.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]

Folder.Contents, Value.Versions, Parquet.Document, OpenBI.Lake, Table.Sort.

Last updated · OpenBI Studio 0.3.79