(Glue-2308) Execute and monitor processes

Execute a process

The resource POST /processes/request serves 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”

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

 

variant

The existing variant name for the extractor process report.

Optional

 

filter

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

Optional

JSON object

 All input parameters are case insensitive.

 Example of REST API call:

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

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.

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

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

requestId

Specific number of the request

Optional

String

processId

Filtering based on the Extraction process ID

Optional

String

All input parameters are case insensitive. 

Example of REST API call:

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

Functionality is implemented in the SAP class /DVD/GL_EXT2_API_REQUESTS.