We are interested in retrieving data from cdf through the odata service. We would do this not from Power BI, but from another Power Platform component, namely Dataverse. (the purpose would be to create "virtual tables" there which we could query, and in that way we could control access to the data more granularly then we are able to thorough the Cognite API)
The documentation we find only mentions the OData connector in relation to Power BI (e.g. Cognite Power BI connector | Cognite documentation (cogniteapp.com) and Tips and best practices | Cognite Documentation).
Is Cognite's OData service specifically tailored for Power BI, or is it a full implementation according to the OData standard? Is anyone able to recommend for or against attempting the proposed approach?
In case the service implements the standard, does anyone know which version of the standard is it?
OData service capabilities
Best answer by Dag Brattli
Hi, it’s correct that the OData service is specifically tailored as the backend for the Power BI connector. But it’s also a fully implemented OData API. However, the OData standard has many optional features, so two “compliant” OData client and servers may still not be able to talk with each other. The CDF OData service is self-describing so you (or an OData client) may inspect the service the following way:
- The service always returns the header: `odata-version: 4.0` as part of the HTTP response
- The service document lists the supported CDF resources (entity sets) relative to the service document: https://api.cognitedata.com/odata/v1/projects/publicdata/
- The metadata document lists the schema in detail for each of the entity sets and specifies which queries are supported. https://api.cognitedata.com/odata/v1/projects/publicdata/$metadata
Note that the two URLs above do not require authentication so you may click on them here with your web browser. But any query that returns data will require a valid bearer token (Authorization header). If the OData client reads and uses the metadata document, then things may work (or not).
If not, you may also use a normal HTTP client (non-OData) with pre-defined queries (i.e. use Fiddler with Power BI to learn how to generate query URLs). All HTTP queries are HTTP GET so they are easy to generate yourself. Then you need something to parse the JSON response so that the data may be consumed by the client application.
Hope this information was useful.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.