Need help with If Condition in Azure Data Factory

Anonymous
2022-07-18T20:54:18.727+00:00

Hi
I posted my question earlier, but I did not quiet get the solution yet, so I am posting this again.
(I got some great help from other developers (thank you so much!!!), but I did not get the final solution yet).
Issue: I am not getting the email notification for the True condition.

I am trying to send email notification using Azure Logic App from Azure Data Factory (after getting result from running stored procedure).

I currently have three/four data flows.

  1. call Stored Procedure which ends up getting 0 or no issue, and 1 for an issue
  2. Set Variable - which grabs that output from Lookup
  3. If Condition - It takes the condition of True
  4. It fires Azure Logic App (to send email for error event)

I have posted screenshots for each steps (with expression added):

1) call Stored Procedure:

declare @returnvalue int
Exec @returnvalue = [dbo].[sp_Validate_tbl...List_Accumulative]
select 'result' = @returnvalue

221919-image.png

2) Set variable
@ hide (activity('Call Proc').output.firstRow.result)

221994-image.png

3) If Condition
@equals(variables('procresult'),1)
221920-image.png

4) If Condition -> True activities
221899-image.png

What am I missing?

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,114 questions
0 comments No comments
{count} votes

Accepted answer
  1. Suba Balaji 10,931 Reputation points
    2022-07-19T05:09:31.1+00:00

    Hi @Anonymous ,

    Please try to enclose the result in single quote as below in the if condition expression.

    @equals(variables('procresult'),'1')

    Kindly let us know if it works or it's still the same.

    Thank you.


0 additional answers

Sort by: Most helpful