SAP Knowledge Base Article - Public

2816755 - Inconsistent results are imported while running same query based on Import Data connection to OData service in SAP Analytics Cloud (SAC)

Symptom

  • Inconsistent results are imported while running same query based on Import Data connection to OData-based service in SAP Analytics Cloud (SAC)
    • During data import, there maybe be duplicate or missing rows/values
    • During dimension import, some dimensions may have different unique members (less then expected) in each run

Environment

  • SAP Analytics Cloud
  • Import data connection to OData Service (SAP S/4HANA, SAP IBP, SAP BPC NW, SAP SuccessFactors, etc.)

Reproducing the Issue

  1. Log on to SAC tenant.
  2. Try to create a new model on Import Data connection to OData-based service.
    => When the same query runs several times, the result differs after each query run if the result set is big (e.g. > 14k records).
    => Some dimensions may have different unique members (less then expected) in each run.

Cause

  • The odata server does not order the data SAC requests, which results in the possibility of duplicate data if retrieved in batches.
  • By default, SAC retrieves data in batches of 1000 and larger amounts of data has higher probability of encountering this issue.
  • UPDATE: Starting from Nov 2023, you can now configure a batch size when creating a query based on an OData connection (and other connection type based on OData, like Import S/4HANA connection, Import SuccessFactors connection).
    • By default, the batch size is set to 50,000, and the range goes from 1,000 to 50,000 (see detail from help guide).
    • Note: custom batch size feature isn't designed for freehand query based on an OData connection. At the moment, it is only supported for query builder. 

Resolution

This issue should be fixed on the OData server side to order the data SAC requests, there are 2 approcahes:

  1. The OData service should implement the “nextLink” function
  2. The entities which are selected as part of the SAC query should be defined as “keys” in the CDS view definition

Workaround: use the freehand query option (available for geneic OData service connection) to force an orderby ($orderby=[Objects]) to include all entities which are selected as part of the SAC query to the $orderby param.

See Also

Your feedback is important to help us improve our knowledge base.

Keywords

SAP Cloud for Planning, sc4p, c4p, cforp, cloudforplanning, EPM-ODS, Cloud for Analytics, Cloud4Analytics, CloudforAnalytics, Cloud 4 Planning, BOC, SAPBusinessObjectsCloud, BusinessObjectsCloud, BOBJcloud, BOCloud., SAC, SAP AC, Cloud-Analytics, CloudAnalytics, SAPCloudAnalytics,  rows, number, members, Odata, missing, lost, unique, different, $skip, $top, $orderby, orderby, freehand, order, batch, duplicate, multiple, multi , KBA , row values are multiplied , multiplied of single records. , measure values are multiplied of single , data are wrong imported and measure valu , LOD-ANA-AQU , Import Data Connections (Acquiring Data) , LOD-ANA-AQU-ODATA , Acquiring Data into SAC using an ODATA connection , How To

Product

SAP Analytics Cloud 1.0