Power BI connector (REST API)
Use the Power BI REST API connector to fetch data with Cognite's OData services or other Cognite APIs using GET
, POST
, and with GraphQL queries for Cognite data models.
The features described in this section are currently in beta testing with selected customers and are subject to change.
Set up a connection to Cognite Data Fusion (CDF)
Follow these steps to connect a Cognite Data Fusion (CDF) project as a data source in Power BI:
-
In
Power BI Desktop, sign in with your organizational account. -
On the Home tab, select Get Data and then More. In the Get Data dialog, search for Cognite and select the Cognite Data Fusion (REST API) connector.
-
In the dialog box, enter details to configure the connection to
CDF:-
CDF project: Enter the name of the
CDFproject you're connecting to. -
CDF organization: Enter the organization to use to sign in to
CDF.
-
-
When prompted, sign in with your account credentials.
-
Select Connect to open the Navigator window.
-
Select the function(s) you want to use, and then select Transform Data to open the
Power Query Editorand retrieve data fromCDF.
Use the maximum supported page size if you make requests that support pagination (via limit
parameters in GET/POST requests, or the first
parameter in GraphQL queries). Smaller page sizes increase API calls and can significantly impact load times. See the Cognite API documentation for the maximum supported page size for each endpoint. For GraphQL queries, the maximum limit is 1000 instances per page.
Filtering data
When using the REST API functions, you can apply server-side filters to reduce the initial data loaded into Power BI.
If you're using OData, Power BI can push down some filters to the OData service when using the Power Query editor.
For GraphQL queries, you can apply filters directly in the query to reduce the amount of data loaded into Power BI. You can also use GraphQL query variables to parameterize your queries and make them more reusable.
Scheduled refresh
After publishing your report to the Power BI service, you can schedule data refreshes to keep your data current.
Error handling
When writing custom GET
and POST
requests, you may get errors if you provide an invalid URL or body. If you receive a CogniteAPIError
error message, refer to the Cognite API reference documentation and adjust your request.