Mathematical Addition in Azure Data Factory between 2 variables

asked 2022-06-24T16:12:00.477+00:00
Abhijit Ghosh 61 Reputation points

Hi All;

I am trying to add 2 numbers i.e. addition of Rows Read by 2 activity and trying to place that values inside a variable. But when I am trying to do this using add() function it is somehow not happening.
My Variable Source_Count is going to have below value:

add(@{activity('Copy_data_1').output.rowsRead},@{activity('Copy_data_2').output.rowsRead})

I tried with String property as well but ultimately output is coming like add(Number1,Number2) but the added value is not showing

add(@{string(activity('Copy_data_1').output.rowsRead)},@{string(activity('Copy_data_2').output.rowsRead)})

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
6,258 questions
{count} votes

Accepted answer
  1. answered 2022-06-24T16:40:49.067+00:00
    Subashri Vasudevan 4,296 Reputation points

    Hi @Abhijit Ghosh ,

    Convert the values to integer and then pass on to the add function as below.

    @ hide (add(int(activity('Copy_data_1').output.rowsRead),int(activity('Copy_data_2').output.rowsRead)))

    Try the above and let us know please.

    Thanks.


0 additional answers

Sort by: Most helpful