OpenBI Docs Buy

Parquet.Document

A Parquet file as a table, its columns typed as the file stores them.

Group: Files and documents. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

Parquet.Document(binary as binary, optional options as nullable record) as table
ParameterTypeDescription
binarybinaryThe file: File.Contents of a path, or Web.Contents of an address.
optionsnullable record
optional
Accepted as Power Query writes it; none is read.

Returns

table. The file's rows and columns.

Remarks

  • DuckDB reads the file, so the steps after it fold into its SQL: a filter or a choice of columns reads only what it needs from the file.
  • Whole numbers come as whole numbers, decimals as numbers, dates as dates, timestamps as datetimes (or datetimezones for UTC timestamps) and strings as texts.
  • Signed-in sources work too: a blob of AzureStorage.Blobs or AzureStorage.BlobContents is fetched with its sign-in, then read.

Compared with Power Query

The binary must be a file's or an address's (File.Contents, Web.Contents, a blob): Parquet bytes made in M, with Binary.FromText say, are refused with a message. Power Query reads any binary.

Examples

A Parquet file

Parquet.Document(File.Contents("C:\Data\orders.parquet"))
OrderIdShopProductOrderDateAmount
1001OsloChair2026-01-05120
1002BergenDesk2026-01-12250
1003OsloLamp2026-02-0345.5
1004TrondheimChair2026-02-17120
1005BergenLamp2026-03-0245.5

A filter that folds into the read

Table.SelectRows(Parquet.Document(File.Contents("C:\Data\orders.parquet")), each [Shop] = "Oslo")[[OrderId], [Amount]]
OrderIdAmount
1001120
100345.5

File.Contents, DeltaLake.Table, Table.SelectRows, DuckDB.Query.

Last updated · OpenBI Studio 0.3.79