Select data access method
The REST API connector provides three ways to access Cognite Data Fusion (CDF) data:| Method | Best for | Performance | Coding required |
|---|---|---|---|
| OData services | Quick exploration, simple queries, no-code users | Baseline | No |
| GraphQL | CDF data Models, precise field selection | Good | Minimal |
| Direct REST (GET/POST) | Large data sets, complex integrations, full Cognite API support | Up to 10x faster | Yes (Power Query) |
Connect to Cognite Data Fusion from Power Query Desktop
Follow these steps to connect a Cognite Data Fusion (CDF) project as a data source in Power BI.1
Sign in to Power BI Desktop
In Power BI Desktop, sign in with your organizational account.
2
Select the Cognite Data Fusion REST API connector
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.

3
Configure the connection details
In the dialog box, enter details to configure the connection to CDF:
- CDF project: Enter the name of the CDF project you’re connecting to.
- CDF organization: Enter the organization to use to sign in to CDF.

4
Authenticate with your account
When prompted, sign in with your account credentials.
5
Connect to the data source
Select Connect to open the Navigator window.
6
Select functions and transform data
Select the function(s) you want to use, and then select Transform Data to open the Power Query editor and retrieve data from CDF.

Connect to Cognite Data Fusion from Power Query Online
Follow these steps to connect to CDF from Power Query Online.1
Select Cognite Data Fusion REST API
Select Cognite Data Fusion (REST API) under Get data. See Where to get data for finding Get data in Power Query Online.

2
Configure connection settings
In Connection settings, enter the following information:
- CDF project: Enter the name of the CDF project you’re connecting to.
- CDF organization: Enter the organization to use to sign in to CDF.

3
Enter connection credentials
In Connection credentials, enter the following information:
- If you’re connecting to CDF for the first time, select Create new connection under Connection.
- If you’ve connected previously, select an existing connection under Connection.
- For Data gateway: If your organization uses a gateway to access CDF, select the appropriate gateway from the menu. If Data gateway is set to (none), the connector uses the Power BI service to connect to CDF directly.
- You can also select Privacy Level for the data connection.
- For new connections, select Sign in and follow the authentication process.

4
Proceed after authentication
Select Next when you’ve signed in.
5
Choose function and create data connection
In Choose data, select the function you require, then select Create to open the Power Query editor and retrieve data from CDF.

Filter data
Use the maximum supported page size if you make requests that support pagination vialimit 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.
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.
About schema and type handling
This is how schema and type information is handled when retrieving data using the different functions in the connector. OData functions When fetching data with theODataCDF or ODataDataModel functions:
- Tables always include type information as the OData protocol includes metadata for every property.
- Even if the result contains no data, for instance due to filtering or an empty resource, the returned table will have a defined schema with properly typed columns.
GetCDF, PostCDF, or GraphQL functions, the outcome can vary:
Successful with data: Returns a table with columns based on the unique properties found in all records present in the API response. Column types are initially set as any since the REST API doesn’t provide type metadata.
Successful but empty: Returns an empty table with no columns, since the API response doesn’t include schema information when no data is present.
Failed request: Throws an error, similar to OData functions.
Best practices for REST functions
Due to the variable schema behavior with REST functions, it’s recommended to:
- Manually define an expected schema with column names and types when using REST functions.
- Apply type transformations to ensure consistent data types across refreshes.
- Consider using a sample query to establish a schema template, then applying that schema even when results might be empty.
Scheduled refresh
After publishing your report to the Power BI service, you must configure scheduled data refreshes to keep your data current and maintain authentication.Error handling
When you’re writing customGET and POST requests, you may get errors if you provide an invalid URL or body. If you receive a CogniteAPIError error message, see the Cognite API reference documentation and adjust your request.