<-- Back

OData service returns error in third-party BI tools: The required instance annotation 'odata.context' was not found at the beginning of a response payload

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:

  1. Open your Mendix application in Studio Pro
  2. Navigate to the published OData service configuration
  3. Locate the Include metadata in response by default option in the OData service settings
  4. Check/enable this option
  5. Redeploy your application
  6. 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:

Have more questions? Submit a request

0 Comments

Article is closed for comments.

To provide feedback, please open a ticket here. Don't forget to include the article's URL along with the feedback you would like to provide.