Issue
When consuming a published OData service from a Mendix application in third-party BI (Business Intelligence) tools, only column headers are returned without any data rows. The Odata is based on an Microflow that runs an MS SQL query and returns a dataset. The Microflow is also configured to a DataGrid2. When testing the same service with GET requests in tools like Postman, data is returned successfully in JSON format. However, when connecting from the BI tool, the following error may occur:
DataSource.Error: OData: The required instance annotation 'odata.context' was not found at the beginning of a response payload.
Environment
Studio Pro (all Versions)
Cause
The OData service settings do not have the Include metadata in response by default option enabled. Some third-party BI tools require this metadata to properly parse and display the data.
Solution / Workaround
To resolve this issue, enable the metadata in the OData service response:
- Open your Mendix application in Studio Pro
- Navigate to the published OData service configuration
- Locate the Include metadata in response by default option in the OData service settings
- Check/enable this option
- Redeploy your application
- Test the connection from your BI tool again
After enabling this setting, the OData service will include the required metadata annotations in the response payload, allowing third-party BI tools to properly parse and display both column headers and data rows.
Internal information related
- 271600
Additional information
Mendix documentation:
0 Comments