Rest API Custom Connection Sources for Replication Flows
You can use REST API connections as sources in replication flows to replicate data into local table file spaces, using SAP Datasphere (HDL_Files) as the target. The REST API acts as a data source similar to other connections. When you select an action from the connection, the system retrieves data records from the API response and creates corresponding replication objects.
Prerequisites
-
Make sure you have created a REST API connection in Connection Management and that it is available in your space. For more information, see:
-
The REST API returns JSON data containing at least one array.
-
You can only create a replication flow with a REST API source in a local table file space.
-
Only SAP Datasphere (HDL_Files) targets are supported.
-
Only Initial and Delta load type is supported.
-
Delta load metrics such as delta record count and delta run count are recorded only when delta synchronization is configured for the REST API connection. To configure delta synchronization, define a filter or query parameter supported by the target API and use the ${lastRunTime:<format>} placeholder in the parameter value (see Use Dynamic Placeholders in Request Parameter Values). Without delta synchronization, delta metrics are cumulative because each delta run processes all available records.
Procedure
-
Select a REST API connection as the source.
-
Select the source container.
REST API connections are structured in the following manner:-
Inside each connection is one or more resources. A resource can represent something like GetAuditActivities.
-
Inside each resource can be one or more actions. You must select an action as your source container.
-
-
Select an action container.
All entities within the selected action are automatically added as replication objects.
-
The system creates one replication object for each entity and automatically generates corresponding target objects in the repository.
Each action contains one root entity and may contain other non-root entities that are dependent on the root entity and cannot be managed independently.
-
Select SAP Datasphere (HDL_Files) as the target connection.
-
Select a replication object and complete the settings as follows:
Properties
Description
Storage
This describes the type of storage available in the space.
Delta Capture
[only relevant for local tables] Enable this option if you want the system to keep track of changes in your data source. Once enabled, the name of the delta capture table is displayed.For more information, see Capturing Delta Changes in Your Local Table.
Load Type
Select the following load type:
-
Initial and Delta - Replicate the data from the object at the start of the run and then continue to replicate inserted and updated records at specified intervals (or scheduled times).
-
Restrictions
-
Projection features such as filtering and mapping are not supported.
-
Source settings are not available for this source type.
-
The replication flow UI does not support existing target objects. Target object names are automatically derived from the resource, action, and entity names and are expected to be unique.
-
You cannot modify individual replication objects or pause, resume, and retry them.
-
Source or target schema changes are not supported after deployment.
-
Deleted records in the REST API source are not deleted from the SAP Datasphere target. REST API replication supports insert and update (upsert) operations only.
Replicating Source Objects Without Primary Keys
Replicating source objects without a primary key is not supported. Only source objects that have a primary key defined can be used as source objects in a replication flow.
Data Types
|
Schema Attribute Type |
Supported |
Target Column Type |
Notes |
|---|---|---|---|
|
number |
Yes |
DOUBLE |
|
|
number, format: double |
Yes |
DOUBLE |
|
|
number, format: float |
No |
- |
Will cause replication failure. Do not use. |
|
integer |
Yes |
BIGINT |
|
|
integer, format: int32 |
Yes |
INTEGER |
|
|
integer, format: int64 |
Yes |
BIGINT |
|
|
string |
Yes |
VARCHAR(5000) |
|
|
string, format: date |
Yes |
DATE |
|
|
string, format: uuid |
Yes |
VARCHAR(36) |
|
|
string, format: hostname |
Yes |
VARCHAR(5000) |
|
|
string, format: ipv4 |
Yes |
VARCHAR(5000) |
|
|
string, format: ipv6 |
Yes |
VARCHAR(5000) |
|
|
string, format: password |
Yes |
VARCHAR(5000) |
Format annotation is ignored; treated as a plain string. |
|
string, format: byte |
Yes |
VARCHAR(5000) |
Format annotation is ignored; treated as a plain string. |
|
string, format: time |
No |
VARCHAR(5000) |
Will cause replication failure. Do not use. |
|
string, format: timestamp |
No |
VARCHAR(5000) |
The format annotation is not enforced or validated by the runtime. Values are stored as plain strings with no format validation. |
|
string with minLength/maxLength |
Yes |
VARCHAR(5000) |
Can only be set by importing an OpenAPI schema. Values that don't meet the constraints are ignored during the replication. |
|
boolean |
Yes |
BOOLEAN |
|
|
array |
No |
- |
Simple array attributes are not replicated. |