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
| Parameter | Type | Description |
|---|---|---|
lake | text | The lake's name in the project ("Lake" is the project's own) or its address, such as lake://folder/<path>. |
options | nullable 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.Versionsof 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"})
| Name | Schema | Item | Kind |
|---|---|---|---|
| orders | main | orders | Table |
| shops | ref | shops | Table |
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")
| OrderId | Shop | OrderDate | Amount |
|---|---|---|---|
| 1002 | Bergen | 2026-01-12 | 250 |
| 1005 | Bergen | 2026-03-02 | 45.5 |
The lake as the first load left it
OpenBI.Lake("lake://folder/C:\Data\shop-lake", [Version = 1]){[Schema = "main", Item = "orders"]}[Data]
| OrderId | Shop | OrderDate | Amount |
|---|---|---|---|
| 1001 | Oslo | 2026-01-05 | 120 |
| 1002 | Bergen | 2026-01-12 | 250 |
| 1003 | Oslo | 2026-02-03 | 45.5 |
Version 1 is the first load: the two orders appended later are not there yet.
Related functions
Value.Versions, DeltaLake.Table, DuckDB.Query, Table.SelectRows.