Using OData Services for Refresh

Prev Next

Overview

Replicate Preview provides support for OData services as both source and target in replication workspaces, currently limited to Snapshot (Refresh) replication mode. This article covers how to create OData datastores, add entities, and configure OData datastores as sources and targets at a high-level.

Supported Databases

Replicate Preview supports:

  • SAP S/4HANA Cloud Public Edition, SAP S/4HANA Cloud Private Edition, and SAP S/4HANA On-Premise

  • OData services on any application that supports read/write operations

Prerequisites

Before creating a refresh replication for both source and target using an OData endpoint, ensure that you complete the following configurations:

  • OData Datastore and Connection: An OData datastore and connection needs to be created in the required system in the Catalog module. Refer to Create a Connection and Connecting Via OData for more information on how to create a datastore connection for OData.

    Note

    Selecting an OData connection disables the database and schema fields, and the schema defaults to OData.

  • Discover OData Entities and Ingest Metadata: Based on your OData service, ensure that you discover the required entities and ingest metadata to the OData datastore. Refer to the Discover Entities (Tables) section for more information.

    Note

    After dicovering entities, a metadata scan is automatically triggered, importing all objects and their metadata into the datastore.

OData Service as a Source

In Replicate Preview, create a source datastore using the OData datastore connection for the required target datastore in a replication workspace. Refer to the Creating Source Datastores section for more information.

Create the required replications either by using the Source Table Selection dialog box or by adding them manually.

Define source filters using filter expressions (for example, Status eq 'Active' or Status eq 'Active' and Price lt 100) and choose which fields and attributes (field mappings) will be read from the OData service.

OData Service as a Target

OData Target Requirements

To use OData endpoints as targets in Replicate Preview, you must understand the following OData API requirements:

  • Pre-existing APIs: OData APIs must already exist in your target system. Unlike tables, Replicate Preview cannot create or modify OData APIs. The APIs and their entity structures must be configured in advance.

  • Field Mappings:

    • Key fields are required: The key field(s) defined in the OData API must be included in all POST (create) and PATCH (update) operations.

    • Field name matching: The field names in your mapping must exactly match the field names defined in the OData API. Mismatched field names will result in replication failures.

    • Choose mapped fields: You can select which fields from your source table to map to the target OData entity. However, ensure that all required fields (key fields and any other mandatory fields) are included.

    • Other required fields: Some OData APIs may have additional required fields beyond the key fields. Review your API documentation to identify all mandatory fields and ensure they are populated before replication.

  • API Operation Support: Different OData services support different operations. Verify that your target OData API supports the operations required by your replication:

    • Read-only services: Cloud Data Integration (CDI) Core Data Services (CDS) View OData services only support GET operations (read access). These cannot be used as replication targets.

    • Read/Write services: APIs that support POST (create) and/or PATCH (update) operations can be used as targets.

    • Check API capabilities: Before configuring a replication to an OData target, confirm that the API supports the required operations (CREATE, UPDATE, or both). Refer to the SAP Business Accelerator Hub (api.sap.com) for more information on comprehensive SAP S/4HANA OData services documentation.

Set up OData Target Datastore in Replicate Preview

In Replicate Preview, create a target datastore using the OData datastore connection in a replication workspace. Refer to the Creating Target Datastores section for more information.

Syniti recommends creating replications manually so you can choose to which OData entity you want to move data from a source table.

Select an OData Upsert Policy

Upsert Policy

Behavior

Best for

Update, then create if not found (default)

SKP attempts a PATCH (update) first. If the record doesn't exist (HTTP 404), it falls back to a POST (create).

General-purpose incremental writes

Check first, then update or create

SKP checks whether the target record exists before deciding whether to PATCH or POST.

Targets that don't return reliable 404 responses, or when you need deterministic existence checks

Create only

SKP always issues a POST (insert) and never attempts updates.

Append-only targets or initial/one-time loads where existing records shouldn't be touched