Table.ConformToPageReader

TableInternal

Conforms a table for page-based reading using a shaping function. Intended for internal use only.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

Table.ConformToPageReader(table as table, shapingFunction as function) as table

Parameters

NameTypeRequiredDescription
tabletableYesThe table to conform for page-based reading.
shapingFunctionfunctionYesA function that transforms the table to match the page reader's expected structure.

Return Value

tableA table conformed to the page reader's expected structure.

Remarks

This function is intended for internal use only. It is part of the Power Query engine's pagination infrastructure, used by connectors that implement paginated data retrieval (e.g., REST APIs that return data in pages). The shapingFunction parameter transforms a table's structure to conform to what the page reader expects.

This function is used at the connector SDK level and is not intended for user-authored M queries. Its behavior may change without notice between Power Query versions.

Examples

Example 1: Paginated data retrieval (recommended approach)

let
    GetPage = (url as text) =>
        let
            Response = Web.Contents(url),
            Body = Json.Document(Response)
        in
            Body,
    FirstPage = GetPage("https://api.example.com/data?page=1")
in
    FirstPage

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks