Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

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

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:

POST

http://servername:portnumber/dvd/glue/api/v3_1/processes/request?sap-client=800

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:

{ 
  "processid": "ZIG_SFLIGHT_P", 
  "packagesize": "50", 
  "previewmode": "X" 
}

 

 Example of the REST API output for preview mode:
{
  "data": [
    {
      "mandt": "001",
      "carrid": "AA",
      "connid": 17,
      "fldate": "2017-04-12",
      "price": 7.0,
      "currency": "USD",
      "planetype": "747-400",
      "seatsmax": 385,
      "seatsocc": 367,
      "paymentsum": 189917.22,
      "seatsmaxB": 31,
      "seatsoccB": 27,
      "seatsmaxF": 21,
      "seatsoccF": 21
    },
    {
      "mandt": "001",
      "carrid": "AA",
      "connid": 17,
      "fldate": "2017-06-21",
      "price": 422.94,
      "currency": "USD",
      "planetype": "747-400",
      "seatsmax": 385,
      "seatsocc": 372,
      "paymentsum": 192649.41,
      "seatsmaxB": 31,
      "seatsoccB": 30,
      "seatsmaxF": 21,
      "seatsoccF": 20
    },
    {
      "mandt": "001",
      "carrid": "AA",
      "connid": 17,
      "fldate": "2017-08-30",
      "price": 9.0,
      "currency": "USD",
      "planetype": "747-400",
      "seatsmax": 385,
      "seatsocc": 372,
      "paymentsum": 192454.85,
      "seatsmaxB": 31,
      "seatsoccB": 30,
      "seatsmaxF": 21,
      "seatsoccF": 20
    },
    {
      "mandt": "001",
      "carrid": "AA",
      "connid": 17,
      "fldate": "2017-11-08",
      "price": 200.0,
      "currency": "EUR",
      "planetype": "767-300",
      "seatsmax": 56,
      "seatsocc": 20,
      "paymentsum": 21.0,
      "seatsmaxB": 5,
      "seatsoccB": 6,
      "seatsmaxF": 7,
      "seatsoccF": 8
    },
    {
      "mandt": "001",
      "carrid": "AA",
      "connid": 17,
      "fldate": "2017-12-02",
      "price": 7.0,
      "currency": "EUR",
      "planetype": "737-200SF",
      "seatsmax": 0,
      "seatsocc": 0,
      "paymentsum": 0,
      "seatsmaxB": 0,
      "seatsoccB": 0,
      "seatsmaxF": 0,
      "seatsoccF": 0
    },
    {
      "mandt": "001",
      "carrid": "AA",
      "connid": 17,
      "fldate": "2017-12-04",
      "price": 20.0,
      "currency": "EUR",
      "planetype": "737-200SF",
      "seatsmax": 0,
      "seatsocc": 0,
      "paymentsum": 0,
      "seatsmaxB": 0,
      "seatsoccB": 0,
      "seatsmaxF": 0,
      "seatsoccF": 0
    }
  ]
}

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

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:

GET

http://servername:portnumber/dvd/glue/api/v3_1/processes/request?sap-client=800

JSON body:

{
  "processid": "ZTS_SFLIGHT_E",
  "requestid": "280606",
  "from": "2020021413385",
  "to": "20200226133853"
}

Example of the REST API output:

{
  "requests": [
    {
      "systemId": "NSD",
      "requestId": 280606,
      "status": "S",
      "rowsRead": 117,
      "rowsWritten": 117,
      "startTime": 20200217143442.794497,
      "endTime": 20200217143510.167021,
      "elapsedTime": 27.372524,
      "fetcherType": "SAP Table Fetcher",
      "consumerType": "GLUE Table Consumer"
    }
  ]
}

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.

  • No labels