SAP Knowledge Base Article - Public

3337495 - OData API returns less records than expected due paging

Symptom

Consumption of exposed data by SAP Datasphere via OData API returns less records than expected.

Environment

SAP Datasphere

Reproducing the Issue

  1. In SAP Datasphere, perform a "Data Preview”;
  2. Compare the number of records using OData API URL (e.g https://<tenant_url>.cloud.sap/dwaas-core/odata/v4/consumption/relational/<Space_ID>/<view>):
    The result is different. 

Cause

The full response cannot be returned in one page due to the page size query option or the response size limit enforced by the service.
In this case, a next link annotated by the @odata.nextLink is provided at the end of the response, which allows you to move to the next page.
There will be no next link when client side pagination is applied or at the final page.

Resolution

There is no way to "force" all data into a single page. Once backend defines that "paging" is required, "paging" size is automatically defined.

Use the nextLink and $skipToken in order to proceed with next request.

Also, to retrieve a specific number of rows, it is possible to use query parameters such as $top and $skip. This will allow to specify the number of records to retrieve,as long as it does not exceed the above-mentioned limitation. 

This works as designed and it's documented in SAP Datasphere's Help page Consume Data via the OData API

See Also

SAP Blog Using the Datasphere OData API with SAP Analytics Cloud

SAP Help Consume Data via the OData API

Keywords

restriction, odata, count, skip, top, o data, paging, less records, not all, dwc, data warehouse cloud, number of records , KBA , DS-BB-ODATA , To address issues related to Odata consumption API , DS-BB , Business Builder , How To

Product

SAP Datasphere all versions