Variables in ADF Pipeline

Deepak Goyal 0
Variables in Adf pipeline

Variables is the adf pipeline provide the functionality to temporary hold the values. They are used for similar reason like we do use variables in the programming language. They are available inside the pipeline and there is set inside the pipeline.

Set Variable and append variable are two type of activities used for the setting or manipulating the variables values.

There are two types of the variable :

System variable

User Variables

Copy activity Azure data factory with example

Azure Fundamentals Exam AZ- 900

System variable: These are some kind of the fixed variable from the azure pipeline itself. For example pipeline name, pipeline id, trigger name etc. You mostly need this to get the system information which might be needed in your use case.

Variables in Adf pipeline

You can also use them directly by clicking on add dynamic content A text window will appear and then you can use from drop down directly.

Variables in Adf pipeline
Variables in Adf pipeline

Once you click on variable name from below they will automatically inserted in the dynamic content box. Like this :

Variables in Adf pipeline

User variable : User variable is something which you declared manually based on your logic of the pipeline. For creating the variable you go the pipeline and under the variable tab click on + sign to add variable.

Variables in Adf pipeline

variable can be of three type. You decide based on your need. You can also provide the default value as per you need.

Variable types :

Array, boolean String.

Once the variable has been declared you can use them using :

@variable(‘variable_name’)

Set variable Activity :

Provide the activity name and click on variable tab it will look like this :

It will ask you to select the variable from the drop down. Once you select the variable from drop down, a another text box appear to set the value :

Now in the value section you can add the fixed value or the dynamic content based on your need.

For example in below I am trying to set the variable as trigger runtime.

This is how I can access variable value in the activity :

Summary : Variables in adf pipelines are used to hold the temporary values and intended to be used within the pipeline. You can use set variable and append variable activity to manipulate the variable value.

Deepak Goyal

<b>Deepak Goyal is certified Azure Cloud Solution Architect. </b>He is having around decade and half experience in designing, developing and managing enterprise cloud solutions. He is also Big data certified professional and passionate cloud advocate.

Leave a Reply

Your email address will not be published. Required fields are marked *