Skip to content

Call Dynamic Extractions with Variables in ADF

The following article shows how to call Xtract Universal extractions dynamically from Azure Data Factory (ADF) using user-defined variables. The depicted example runs extractions daily to write data added or updated on the day before to the destination.

Call Dynamic Extractions with Variables

The depicted example calls an extraction with a date parameter in ADF. The date parameter is set dynamically using a user-defined variable.

  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 .
    adf-pipeline
  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 . 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'))
    adf-call-extractions-variable
  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 Documentation: Run an Extraction.



Last update: October 20, 2024