Downloads
Power Query MData sourcesIntermediate

OData.Feed

Connects to an OData service, a web data feed used by many business applications, and returns the tables it publishes.

Syntax
OData.Feed(serviceUri, optional headers, optional options)

Returns: A navigation table. Selecting a table from it gives you that feed's rows.

What it does

OData is a standard for data feeds that many business applications publish. OData.Feed connects to such a feed and lists the entities it offers, such as invoices, customers or ledger entries. You pick one, and its rows load. Where the service supports it, filters and column choices are sent back to the service, so it returns less data.

Syntax and arguments

Example

An application publishes its open invoices as an OData feed. The query loads the invoice entity and keeps the open, unpaid items.

let
    Source = OData.Feed("https://reports.example.com/odata/"),
    Invoices = Source{[Name = "Invoices"]}[Data],
    Open = Table.SelectRows(Invoices, each [Status] = "Open"),
    Kept = Table.SelectColumns(Open, {"InvoiceNumber", "CustomerName", "Amount", "DueDate"})
in
    Kept

The address is a placeholder for a service you have access to. Source lists the entities, and the lookup picks Invoices. The filter and column choices may be sent to the service, depending on what it supports.

Example: a second, different use

Reading one entity with a fixed set of columns, to build a customer list for a receivables review.

Things to watch

In business terms

Many accounting, billing, payroll and CRM products expose their data this way. Connecting to a feed avoids manual exports and keeps the report current.

Related functions

All Power Query M functions · View as Markdown · M basics