OpenBI Docs Buy

OpenBI.Lake OpenBI

An OpenBI lake's tables and views to navigate, as they are now or as they were at a version or a moment.

Group: Databases and lakes. OpenBI’s own: Power Query M has no function of this name.

Syntax

OpenBI.Lake(lake as text, optional options as nullable record) as table
ParameterTypeDescription
laketextThe lake's name in the project ("Lake" is the project's own) or its address, such as lake://folder/<path>.
optionsnullable record
optional
Version (a whole number; the text Value.Versions shows works too) or AsOf (a date, datetime or datetimezone): read the lake as it was then. Not both.

Returns

table. Name, Data, Schema, Item and Kind ("Table" or "View"), a row per table or view, by schema and name.

Remarks

  • Get data from a lake writes OpenBI.Lake("Lake"){[Schema = "main", Item = "orders"]}[Data], the lake by its name in the project. An address names the lake itself, such as lake://folder/ and a folder's path for a lake kept in a folder; the Lake explorer shows each lake's.
  • DuckDB reads the lake's Parquet files, so the steps after a table fold into the read.
  • Version 0 is the lake as it was made; each lake load or change adds one. Value.Versions of a table lists the versions that changed it, with their Author and Message.
  • A version the lake no longer keeps, or a lake that isn't at its address, is an error that says how to fix it.

Compared with Power Query

An OpenBI function: Power Query has none like it, so a query that uses it runs in OpenBI only, not in Power BI Desktop or the Power BI service.

Examples

A lake's tables

This lake was written by two lake loads: orders and shops, then two more orders appended.

Table.SelectColumns(OpenBI.Lake("lake://folder/C:\Data\shop-lake"), {"Name", "Schema", "Item", "Kind"})
NameSchemaItemKind
ordersmainordersTable
shopsrefshopsTable

A table, with a filter that folds

let
    Orders = OpenBI.Lake("lake://folder/C:\Data\shop-lake"){[Schema = "main", Item = "orders"]}[Data]
in
    Table.SelectRows(Orders, each [Shop] = "Bergen")
OrderIdShopOrderDateAmount
1002Bergen2026-01-12250
1005Bergen2026-03-0245.5

The lake as the first load left it

OpenBI.Lake("lake://folder/C:\Data\shop-lake", [Version = 1]){[Schema = "main", Item = "orders"]}[Data]
OrderIdShopOrderDateAmount
1001Oslo2026-01-05120
1002Bergen2026-01-12250
1003Oslo2026-02-0345.5

Version 1 is the first load: the two orders appended later are not there yet.

Value.Versions, DeltaLake.Table, DuckDB.Query, Table.SelectRows.

Last updated · OpenBI Studio 0.3.79