(Glue-2308) Workflows
A workflow is the combination of multiple SNP Glue™ objects and describes the flow of the data from the source (e.g. SAP table) all the way down the target (e.g. SNP Glue™ table).
Create workflows
Using POST /workflow API is possible to mass generate workflows ready to be executed.
Global parameters
Parameter name | Description | Usage | Type |
---|---|---|---|
SourceObjectName | Array with the list of SAP source objects for which to generate the replication objects | Mandatory | String |
SourceObjectType | The type of SAP object to read from. Currently supporting ADSO and SAP tables | Mandatory | "table/view" | ”ADSO” |
ExecutionType | According to the type of execution requested, the API will generate the necessary objects | Mandatory | “SD” - standard | |
GlueTableSett | Parameters for SNP Glue™ table generation, mandatory for “standard” and “FIFOAsynch” ExecutionType | Optional | JSON object (see below) |
ext2Sett | Parameters for Extractors 2.0 generation | Mandatory | JSON object (see below) |
asyncExec | Execute generation in a background job (Asynchronous) | Optional | ‘’ or ‘X’ |
skipExisting | Skip generation of existing objects | Optional | ‘’ or ‘X’ |
GlueTableSett: SNP Glue™ table generation parameter object
Parameter name | Description | Usage | Type |
---|---|---|---|
prefix | Object prefix | Mandatory | String |
suffix | Object suffix | Optional | String |
devclass | Package for object | Mandatory | String |
storID | Storage ID | Mandatory | String |
meaningFields | Meaningful fieldname | Optional | Boolean |
meaningValues | Speaking field values | Optional | Boolean |
glRequest | Add SNP Glue™ Request field | Optional | Boolean |
glRequestAsKey | Add SNP Glue™ request as a key | Optional | Boolean |
CSVFolderName | File storage folder name | Obligatory in case of file storages | String, default “<GLUE_TABNAME>” |
CSVDelimiter | File storage – Delimiter type | Obligatory in case of file storages | String |
CSVQuotes | File storage – Put values into quotes | Optional | Boolean |
CSVEscaping | File storage – Use extended escaping | Optional | Boolean |
CSVHeader | File storage – Include table header | Optional | Boolean |
CSVOneFile | File storage – One file extraction | Optional | Boolean |
CSVCompress | File storage – Compress file | Optional | Boolean |
CSVCompressLevel | File storage – Compression level | Optional | Int |
ext2Sett: SNP Glue™ Extractor 2.0
Parameter name | Description | Usage | Type |
---|---|---|---|
prefix | Object prefix, must start with Z | Mandatory | String |
suffixFetcher | Fetcher suffix | Optional | String, default “_F“ |
suffixConsumer | Consumer suffix | Optional | String, default “_C” |
suffixProcess | Extraction process suffix | Optional | String, default “_P” |
devclass | Package for object | Mandatory | String |
deltaType | Delta type, with generate endpoint only trigger and full are possible, different modes can be enabled using PATCH process endpoint | Mandatory | “FULL“ | “TRIGGER“ |
loadType | The default load type, can be changed at execution time | Mandatory | “F“ | ”D” | ”I” | ”L” |
keyFieldsFilter | Add key fields as a selection parameter | Optional | Boolean |
noActivation | Do not activate objects | Optional | Boolean |
useDeduplication | Use deduplication | Optional | Boolean |
All input parameters are case insensitive.
Example of REST API call:
JSON body:
{
"SourceObjectType": "table/view",
"SourceObjectName": [
"SFLIGHT"
],
"GlueTableSett": {
"prefix": "Z_",
"devclass": "ZPACKAGE",
"storID":"AWS_S3",
"glRequest": "",
"glRequestAsKey": ""
},
"ext2Sett": {
"prefix": "Z_",
"devclass": "ZPACKAGE",
"suffixFetcher": "_F",
"suffixConsumer": "_C",
"suffixProcess": "_P",
"deltaType": "FULL",
"loadType": "F"
}
}
Example of the REST API output:
{
"message": [
{
"msgtype": "S",
"text": "Generating Glue table 1 for Table/View SFLIGHT..."
},
{
"msgtype": "S",
"text": "Glue table Z_SFLIGHT generated successfully."
},
{
"msgtype": "S",
"text": "Generating Extractor2.0 1 for Glue table Z_SFLIGHT..."
},
{
"msgtype": "S",
"text": "Extractor2.0 object Z_SFLIGHT_F generated successfully."
},
{
"msgtype": "S",
"text": "Extractor2.0 object Z_SFLIGHT_C generated successfully."
},
{
"msgtype": "S",
"text": "Extractor2.0 object Z_SFLIGHT_P generated successfully."
}
]
}
If the job is scheduled in the background (async generation), the HTTP response code will be set to 200 with information about the generated SAP job
“200 Generation scheduled under Job name - ZDVD_GLUE_OBJ_GEN_MCHOMA”
Functionality is implemented in the SAP class /DVD/GL_EXT2_API_GENERATE.
Error handling
Every error message is raised via code 400. The reason for the error is also provided; however further investigation might be needed on the SAP side.
Delete workflows
Resource DELETE /workflows serve as a mass deletion function for SNP Glue™ objects.
It supports the following input parameters:
Global parameters
Parameter name | Description | Usage | Type |
---|---|---|---|
ObjectName | Array with the list of SNP Glue™ objects for deletion (SNP Glue™ Tables and Extractor 2.0 objects) | Mandatory | String |
All input parameters are case insensitive.
Example of REST API call:
JSON body:
{
"objectName": [
"ZMCH_SFLIGHT_F",
"ZMCH_SFLIGHT",
"ZMCH_SFLIGHT_FIFO_C",
"ZMCH_SFLIGHT_1_P",
"ZMCH_SFLIGHT_FIFO_F",
"ZMCH_SFLIGHT_C",
"ZMCH_SFLIGHT_2_P",
"ZMCH_SFLIGHT_F"
]
}
Example of the REST API output:
Functionality is implemented in the SAP class /DVD/GL_EXT2_API_DELETE_OBJ.
Error handling
Every error message is raised via code 400. The reason for the error is also provided; however, further investigation might be needed on the SAP side.