1
votes

I have one Copy activity and two stored Proc Activity and i want to basically update the status of my pipeline as Failed in Logtable if any of these activities failed with error message details. Below is the flow of my pipeline

enter image description here

I wanted to use If-Condition activity and need help in setting the expression for it. For Copy activity i can use the below expression, but not sure about getting the status of stored Proc activity

@or(equals(activity('Copy Data Source1').output.executionDetails[0].status, 'Failed'), <expression to get the status of Stored Proc>)

If the above expression is true then i want to have one common stored proc activity that i will set in Add If True Activity to log the error details

Let me know if this possible.

1
Why you do not use Failure path for required activities? That would be much easier. Furthermore, SP would not be executed when Copy Data fails, therefore checking the status of execution of SP doesn't really make sense.Kamil Nowinski
Yes thats correct will do the change. Thanks!user1941025
Consider posting this as the answer @KamilNowinski? Maybe add a few screenshots, expand the explanation slightly, but it's a good approach.wBob
Thanks @wBob, I have just done it.Kamil Nowinski

1 Answers

1
votes

I think you have overcomplicated this.
A much easier way to do that is to leverage a Failure path for required activities. Furthermore, SP would not be executed when Copy Data fails, therefore checking the status of execution of SP doesn't really make sense. My pipeline would look like this: enter image description here