Search code examples
azure-data-factoryscript-task

Script task output to check if condition


From the script task I get an output { "resultSetCount": 1, "recordsAffected": 0, "resultSets": [ { "rowCount": 1, "rows": [ { "flag": 1 } ] } ],

how to build an expression to check if the flag is 1

@equals(activity('Script1').output.resultSets.flag,1) This is not working


Solution

  • Use this expression to get the required output value from script activity output in If Condition.

    @equals(activity('Script1').output.resultSets[0]['rows'][0].flag,1)