Symptom
Data Flow in SAP Datasphere failed with the following error when Batch Query is turned on (Add a Source to a Data Flow):
- Cannot invoke "java.lang.Integer.intValue()" because the return value of "org.apache.olingo.odata2.api.ep.feed.FeedMetadata.getInlineCount()" is null
Environment
SAP Datasphere
Reproducing the Issue
- Create a ODATA connection
- Create a Data Flow in Datasphere with the ODATA connection and enable Batch Query
- Save, deploy and run the Data Flow.
Cause
Batch Query mode needs the OData service to return the total number of records.
If the service does not return this number, FeedMetadata.getInlineCount() is null, and the Data Flow fails.
Resolution
Test the OData service with tools (like Postman) to see if it supports record count, for example:
- https://<service root url>/<entity set>/$count
- https://<service root url>/<entity set>?$top=1&$inlinecount=allpages (OData V2)
- https://<service root url>/<entity set>?$top=1&$count=true (OData V4)
If none of them return a count, Batch Query will fail in Datasphere. In this case, contact the OData service provider to enable record counting support.
See Also
KBA 3540833 - Extracting Data from SAP FSM to SAP Datasphere
This KBA describes the similar error in the SAP FSM scenario, where the OData service does not return the total record count.
Keywords
batch_query, Batch,ODATA,org.apache.olingo.odata2.api.ep.feed.FeedMetadata.getInlineCount(), dataflow , KBA , DS-DI-DF , Data Flows , DS-DI-CON , Connections , CA-DI-EMB , Data Intelligence Embedded in Data Warehouse Cloud , Problem
SAP Knowledge Base Article - Public