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.
- 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.
- Create a pipeline in ADF that stores yesterday’s date in a variable (1).
- 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.
- 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]
- 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'))
- 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.
- Run an ADF pipeline when an SAP extraction file is successfully uploaded to Azure storage
- Integration in Azure Data Factory using Webservices
- Integration in Azure Data Factory using Command Line
- Online Help: User-Defined Variables
- Online Help: Call via Webservice
- Online Help: Metadata access via HTTP-JSON