Blog Post

Azure Data Factory Blog
1 MIN READ

Integer Type Available for Pipeline Variables

ChenyeCharlieZhu's avatar
Aug 17, 2023

Today, we are announcing the support for Integer type for pipeline variables. This feature is quite self-explanatory: you can define a pipeline variable as integer, and use all the arithmetic functions with it, without converting it back to string type anymore. 

 

 

This significantly simplifies the workflow if you are using an iterator within an Until or ForEach activity. Please note that in a Set variable activity, you can't reference the variable being set in the value field, i.e., no self-referencing. To work around this limitation, set a temporary variable and then create a second Set variable activity. The second Set variable activity sets the value of the iterator to the temporary variable.

 

 

 

Please be aware that variables are scoped at the pipeline level. This means that they're not thread safe and may cause unexpected and undesired behavior if they're used along with parallel iteration. Particularly, please be very careful when the value is also being modified within that ForEach activity.

 

 

We hope that you found this helpful! Let us know in the comments if you have any questions or feedback!

 

Updated Aug 17, 2023
Version 1.0
  • mattmodget's avatar
    mattmodget
    Copper Contributor

    This is a great addition, thank you!

     

    I have a pipeline which stores integers as variables and used the String type due to Integer not having been previously available. It has an 'Until' activity that keeps running until one number is greaterOrEqual to another and has worked fine for years. Earlier this month it started performing this greaterOrEquals comparison alphabetically rather than numerically, so it deemed 500 greater than 1000, and caused significant issues. Is this because the String type is now being enforced alphabetically due to the new Integer type?