Skip to main content

Accessing OData service from Power BI

info

Available for Flex (SSIS) and Gems (Pre-built)

Overview

To use the COZYROC Cloud OData service from Power BI we have to supply the Authentication Token to the OData Feed component. The default OData connector provided by PowerBI Desktop does not provide an option to pass the token in the header, however this is quite easy to do if we use the Blank Query template and manually set the header field value.

  1. In Home tab, Data section, click on Get Data button and then on Blank Query to create new empty query and bring the Power Query Editor.

img

  1. In the Power Query Editor select the Home tab, Query section and click on Advanced editor button.

  2. Add the following code in the editor window, set the correct execution URL and Authorization token values and click Done.

let
AuthToken = "PUT_YOUR_AUTHORIZATION_TOKEN_HERE",
PackageUrl = "PUT_PACKAGE_EXECUTION_URL_HERE",
Source = OData.Feed(
PackageUrl,
null,
[
Headers = [ Authorization = AuthToken ]
]
)
in
Source

img

note

OData.Feed function will handle cursor pagination for you internally.