How to Load Data from an OData Feed into Power Query Desktop and Online

Summary

ItemDescription
Release StateGeneral Availability
ProductsPower BI (Datasets)
Power BI (Dataflows)
Power Apps (Dataflows)
Excel
Dynamics 365 Customer Insights
Analysis Services
Authentication Types SupportedAnonymous
Windows
Basic (requires Gateway)
Web API
Organizational Account
Function Reference DocumentationOData.FeedODataOmitValues.Nulls

 Note

Some capabilities may be present in one product but not others due to deployment schedules and host-specific capabilities.

Load data from an OData Feed in Power Query Desktop

To load data from an OData Feed in Power Query Desktop:

  1. Select the OData or OData Feed option in the connector selection.
  2. Choose the Basic button and enter a URL address in the text box. This URL should be the root of the OData service you want to connect to. For example, enter http://services.odata.org/V4/northwind/northwind.svc/. Then select OK.OData URL selection.If the URL address you enter is invalid, a Warning icon. warning icon will appear next to the URL textbox.
  3. If this is the first time you’re connecting using the OData Feed, select the authentication type, input your credentials (if necessary), and select the level to apply the authentication settings to. Then select Connect.OData credentials selection.
  4. From the Navigator dialog, you can select a table, then either transform the data in the Power Query Editor by selecting Transform Data, or load the data by selecting Load.Web table selection.If you have multiple tables that have a direct relationship to one or more of the already selected tables, you can select the Select Related Tables button. When you do, all tables that have a direct relationship to one or more of the already selected tables will be imported as well.

Load data from an OData Feed in Power Query Online

To load data from an OData Feed in Power Query Online:

  1. Select the OData or OData Feed option in the connector selection.
  2. In the OData dialog that appears, enter a URL in the text box.OData online sign in.
  3. If this is the first time you’re connecting using the OData Feed, select the authentication kind and enter your credentials (if necessary). Then select Next.
  4. From the Navigator dialog, you can select a table, then transform the data in the Power Query Editor by selecting Transform Data.Web table selection.If you have multiple tables that have a direct relationship to one or more of the already selected tables, you can select the Select Related Tables button. When you do, all tables that have a direct relationship to one or more of the already selected tables will be imported as well.

Known Issues and Limitations

Joins

Due to the architecture of OData and other web connectors, joins can be non-performant. While you have the option to use navigation columns when merging between tables from an OData source, you don’t have this option when merging with non-Odata sources.

If you are seeing performance issues when merging an OData source, you should apply Table.Buffer to your OData query in the Advanced Editor, before you merge the data.

Test Connection issues

In cases where you’re passing in a URL to the OData connector that’s not just the service root, for example, if you have a filter on the URL, when you set up refresh in the service you should select Skip Test Connection.

Authenticating to arbitrary services

Some services support the ability for the OData connector to authenticate with OAuth/AAD authentication out of the box. However, this won’t work in most cases.

When attempting to authenticate, if you see the following error:

“We were unable to connect because this credential type isn’t supported for this resource. Please choose another credential type.”

Error from connecting to an endpoint that doesn't support OAuth with the web connector.

Contact the service owner. They’ll either need to change the authentication configuration or build a custom connector.

Maximum URL length

If you’re using the OData feed connector to connect to a SharePoint list, SharePoint online list, or Project Online, the maximum URL length for these connections is approximately 2100 characters. Exceeding the character limit results in an 401 error. This maximum URL length is built in the SharePoint front end and can’t be changed.

To get around this limitation, start with the root OData endpoint and then navigate and filter inside Power Query. Power Query filters this URL locally when the URL is too long for SharePoint to handle. For example, start with Copy

OData.Feed("https://contoso.sharepoint.com/teams/sales/_api/ProjectData")

instead, copy

OData.Feed("https://contoso.sharepoint.com/teams/sales/_api/ProjectData/Projects?

Ref: https://docs.microsoft.com/en-us/power-query/connectors/odatafeed