Parameters and Variable is ADF

Introduction
In this Blog post, we are going to explore related to pipeline Parameters and Variable.

Hope it will be interesting.

 

Little Theoretical portion that we need to know

 

If we think about SSIS, we have package level parameters and we can define variables within the package. We have to define the scope of the variable, where we can access it or not, such as entire package or a definite container.

 

In ADF also, we have both Pipeline level Parameters and Variables.

 

A Parameter has data type like String, Int, Float, Bool, Array, Object and Secure String. But one thing we have to remember that, when we define a parameters and its value we are unable to over write parameters value within any activity of pipeline. We can just read the value of parameters.

 

Note : SecureString is a string type that provides a measure of security. It tries to avoid storing potentially sensitive strings in process memory as plain text. This type implements the IDisposable interface. When you have finished using an instance of the type, you should dispose of it either directly or indirectly.

 

In other side, a Variable has only there type of Data Type i.e. String, Array, Boolean. We can Access the Variable in any activity within the pipeline and also assigned the value.  Assignment of value within variable is done by two activities named Set Variables and Appends Variables.

 

Set variable is used to assign the value of all kind of variables. In other hand the Append Variable is used to assign the value of Array Data Type.

 

 

Now proceed to a simple Example to understand

 

ADF Flow

 


 

Pipeline Parameter and Variable Declaration

 


Set Variable Activity

Here the name is “Set Files”

 


 

Here the variable named “Files” is an Array Type, we can assign multiple value by using coma separator. Please remember space is not allowed. In our example we used

 

colors,inventories,inventory_parts,part_categories,parts,sets,themes

 

If Connection Activity

 

Remember we used a parameters in our pipe line named “LoadAllFiles” type Boolean. By using true or false we can decide the If Condition. Please remember the boolen true or false is in small letter only.

 


 

Append Variables Activity

 


 

Output

 


 


 


 


 

 

Hope you like it.


Comments

Popular Posts

Triggering Pipeline in ADF

Working with Python – Class and Object Concept

Working with Spark – Spark RDD