OpenBI Docs Buy

Value.Versions

The versions of a versioned table, such as a Delta table or a table of an OpenBI lake, each with its data.

Group: Values, types and errors. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

Value.Versions(value as any) as table
ParameterTypeDescription
valueanyA table read with DeltaLake.Table, or a table of OpenBI.Lake.

Returns

table. A row per version, oldest first, and a last row with Version null for the table as it is now: Version (text), Published, Data, Modified and Durable; a lake's table adds Author and Message.

Remarks

  • Data reads the table as it was at that version; Modified is when the version was written.
  • A lake's table lists only the versions that changed that table.
  • Any other value is an Expression.Error: it does not support versioning.

Examples

A Delta table's versions

Two versions wrote it: three orders, then two more appended.

Table.SelectColumns(Value.Versions(DeltaLake.Table(Folder.Contents("C:\Data\orders-delta"))), {"Version", "Published", "Durable"})
VersionPublishedDurable
0truetrue
1truetrue
nulltruetrue

The first version's rows

Table.RowCount(Value.Versions(DeltaLake.Table(Folder.Contents("C:\Data\orders-delta"))){[Version = "0"]}[Data])
3

A lake table's versions, with who wrote them

let
    Orders = OpenBI.Lake("lake://folder/C:\Data\shop-lake"){[Schema = "main", Item = "orders"]}[Data]
in
    Table.SelectColumns(Value.Versions(Orders), {"Version", "Author", "Message"})
VersionAuthorMessage
1DocsLake load "First": Orders, Shops
2DocsLake load "Second": More
nullDocsLake load "Second": More

Value.VersionIdentity, DeltaLake.Table, OpenBI.Lake.

Last updated · OpenBI Studio 0.3.79