Table.PartitionValues
TableReturns a table describing the partition values for a partitioned data source.
Syntax
Table.PartitionValues(table as table) as tableParameters
| Name | Type | Required | Description |
|---|---|---|---|
table | table | Yes | A table from a partitioned data source. |
Return Value
table — A table where each row represents a partition with its key column values.
Remarks
Table.PartitionValues returns a table describing the available partitions of a partitioned data source. Each row in the result corresponds to one partition and contains the partition key column values. This function is specific to connectors that expose partition metadata — such as Azure Data Lake Storage, Microsoft Fabric Lakehouses, or certain OData sources — and is primarily used in advanced connector development and data exploration scenarios.
Unlike Table.Partition (which programmatically divides an arbitrary table into N hash-based buckets), Table.PartitionValues reads existing partition structure declared by the underlying data source. This distinction matters: Table.PartitionValues is a metadata query about the source, not a computation on in-memory data.
A common use case is to enumerate available partitions and then load each one selectively rather than pulling all data at once. This can reduce data transfer when only specific partition ranges are needed (e.g., only year 2024 partitions from a multi-year lake table).
Examples
Example 1: List partition values from an Azure Data Lake table
let
Source = AzureStorage.DataLake("https://myaccount.dfs.core.windows.net"),
PartitionedTable = Source{[Name = "sales"]}[Data],
Partitions = Table.PartitionValues(PartitionedTable)
in
PartitionsThe final output — calls Table.PartitionValues to retrieve the partition key metadata, returning one row per available partition with Year and Month columns.
Year | Month | |
|---|---|---|
| 1 | 2024 | 01 |
| 2 | 2024 | 02 |
| 3 | 2024 | 03 |
| 4 | 2024 | 04 |
Example 2: Inspect partition metadata from a Fabric Lakehouse
let
Source = Lakehouse.Contents(null){[workspaceId = "my-workspace-id", lakehouseId = "my-lakehouse-id"]}[Data],
SalesTable = Source{[Id = "sales", ItemKind = "Table"]}[Data],
Partitions = Table.PartitionValues(SalesTable)
in
PartitionsThe final output — calls Table.PartitionValues to retrieve partition metadata, returning one row per year partition available in the Lakehouse table.
Year | |
|---|---|
| 1 | 2022 |
| 2 | 2023 |
| 3 | 2024 |
Example 3: Filter to load only recent partitions
let
Source = AzureStorage.DataLake("https://myaccount.dfs.core.windows.net"),
PartitionedTable = Source{[Name = "sales"]}[Data],
Partitions = Table.PartitionValues(PartitionedTable),
RecentPartitions = Table.SelectRows(Partitions, each [Year] = "2024"),
Data = Table.Combine(
List.Transform(
Table.ToRows(RecentPartitions),
each PartitionedTable{[Year = _{0}, Month = _{1}]}[Data]
)
)
in
DataThe final output — loads and combines only the 2024 partitions from the data lake, reducing data transfer compared to loading all years.
Note | |
|---|---|
| 1 | Returns all rows from 2024 partitions only, reducing data transfer from the lake. |