(Glue-2305) v3.1 Execute and monitor processes

Execute a process

The resource POST /processes/requests serve as the main way to execute the Extraction Process. It supports the following input parameters:

Parameter name

Description

Usage

Type

Parameter name

Description

Usage

Type

processID

Filtering based on the process ID

Mandatory

 String

loadType

Delta type of the load, default value is “F” (Full load)

Optional

 “F“ | ”D” | ”I” | ”L” | “R“

truncate

Option to truncate the table before the data load, the default value is “” (Don’t truncate)

Optional

 “X“ | ““

packageSize

Option to set the number of rows for each package, the default value is 10.000

Optional

 Int

previewMode

Option to view data from a source before Extraction Process. It is important to specify the package size parameter, max value is 1000; default is 20

Optional

 “X“ | ““

variant

The existing standard SAP variant name for the extractor process report.

Optional

 String

filter

If the Fetcher has been configured to accept filter specifications, they can be specified using this parameter

Optional

JSON object

odpReadMode

Execution mode used by ODP Fetcher , default value is set when creating ODP Fetcher

Optional

“P“ | “S” | “D“

 All input parameters are case-insensitive.

 Example of REST API call:

POST

http://servername:portnumber/dvd/glue/api/v3_1/processes/requests?sap-client=clientnumber

POST

http://servername:portnumber/dvd/glue/api/v3_1/processes/requests?sap-client=clientnumber

JSON body:

{ "processid": "z99_sflight_p", "loadType": "F", "filter": [ { "fieldname": "CARRID", "selopt": [ { "sign": "I", "option": "EQ", "low": "AA", "high": "" }, { "sign": "I", "option": "EQ", "low": "578", "high": "" } ] }, { "fieldname": "CONNID", "selopt": [ { "sign": "I", "option": "EQ", "low": "17", "high": "" } ] } ] }

Example of the REST API output:

 { “requestId”: 281309 }

Filter parameters

It is possible to specify table filters. To reflect the ABAP filter design, the filter object needs to have the structure

"filter": [ { "fieldname": "CARRID", "selopt": [ { "sign": "I", "option": "EQ", "low": "AA", "high": "" }] }]
  • fieldname: the name of the SAP table field used for the filtering operation

  • seleopt: object that defines the ranges and filters

    • sign: “I“ for include and “E“ for exclude

    • option: can be a whole range, which includes:

      • “EQ”        (Equal) 

      • “BT”        (Between)) 

      • “CP”        (Contain Pattern)

    • low: contains the first value, in the case or EQ sign is the field that is used

    • high: used together with low when specifying ranges

It is possible to use the sign * when looking for patterns in strings. E.g. “AB*“ will look for all the values in a field starting with AB

Preview mode 

This API can be executed in preview mode,

Example of REST API parameters in preview mode: 

JSON body:

 

Load type

When a process is configured for delta replication, the execution can be run in different modalities:

  • “F”          Full Load (Repair) Without Delta Update

  • “D”         Delta Load

  • “I”           Delta Init Without Data

  • “L”          Delta Init + Full Load - not supported by ODP fetcher

  • 'R' Recovery of Previous Deltas - ODP Fetcher specific load type

Truncate values

Only valid for structured storages (tables and transparent binary)

  • “X”          Truncate the target table

  • ““ No truncate

Functionality is implemented in the SAP class /DVD/GL_EXT2_API_SCHEDULE_V3

Execution mode - odpReadMode

ODP Fetcher specific Mode of the execution

  • “P“ Parallel Extraction Using ODQ

  • “S“ Serial Extraction Using ODQ

  • “D” Direct Extraction Without ODQ

List and monitor available requests for a process

Resource GET /processes/requests serve as the main way to list all available Requests that have been executed. It supports the following input parameters:

Parameter name

Description

Usage

Type

Parameter name

Description

Usage

Type

requestId

Specific number of the request

Optional

String

processId

Filtering based on the Extraction process ID

Optional

String

status

Request status

Optional

 “N“ | ”P” | ”R” | ”E” | ”S” | ”F”

deltaType

Defines whether Processes use one of the delta type or are FULL load onlys

Optional

"FULL" | "TMSTMP" | "TRIGGER" | "VALUE"

loadType

Delta type of the load

Optional

 “F“ | ”D” | ”I” | ”L”

from

The lowest value of the START_TIME, represented as a timestamp

Optional

Format -YYYYMMDDHHMMSS

to

The highest value of the START_TIME, represented as a timestamp

Optional

Format - YYYYMMDDHHMMSS

All input parameters are case-insensitive. 

Example of REST API call:

GET

http://servername:portnumber/dvd/glue/api/v3_1/processes/requests?sap-client=clientnumber

GET

http://servername:portnumber/dvd/glue/api/v3_1/processes/requests?sap-client=clientnumber

JSON body:

Example of the REST API output:

Status values:

  • N        New

  • P Pending

  • R         Running

  • E         Ended with an error

  • F         Failed

  • S         Ended successfully

  •            Space

 

Delta type values:

  • FULL Full loads only (no delta enabled)

  • TMSTMP Timestamp delta

  • TRIGGER Trigger delta

  • VALUE Value delta

Functionality is implemented in the SAP class /DVD/GL_EXT2_API_REQUESTS_V3_1