The following article shows how to call Xtract Universal extractions dynamically from Azure Data Factory (ADF) using user-defined variables.

Calling Dynamic Extractions with Variables #

In The depicted example, an extraction with a date parameter is called in ADF. The date parameter is set dynamically using a user-defined variable.
The goal of this example is to run daily extractions that only write data added or updated on the day before to the destination.

  1. Create an extraction in Xtract Universal that uses runtime parameters.
    The depicted example uses an extraction called 0COSTCENTER_0101_HIER with a date parameter called myDate.
  2. Create a pipeline in ADF that stores yesterday’s date in a variable (1).
  3. Format the date to the internal SAP date format (YYYYMMDD).
    The type and format of the input variable must match the type and format of the actual parameter in Xtract Universal. adf-call-extractions-variable
  4. Add a web activity that calls extractions (2). The URL used to call static extractions has the following format:
    [Protocol]://[HOST or IP address]:[Port]/?name=[Name of the Extraction]
  5. To set runtime parameters of an extraction, add the corresponding variables to the extraction URL using the @concat command. The concatenated string has the following format:
    @concat('[Protocol]://[HOST or IP address]:[Port]/?name=[Name of the Extraction]&[Name of the Parameter in XU]=',variables('[Name of the Variable in ADF'))
  6. Run the pipeline and check the result.

Tip: You can copy the URL of an extraction from the Run window in Xtract Universal, see Online Help: Running an Extraction.