Search code examples
azureazure-data-factory

How to fetch the status of Execute pipeline activity and pass it to stored procedure activity in ADF


I have 2 activities in my ADF pipeline.

enter image description here

I need to get the overall status (Success or Failed) of execute pipeline activity and pass it to stored procedure activity in the parameters.

I'm able to get the datafactory name, pipelinename. In the pipelineStatus im adding the below dynamic content

@activity('ExecutePipeline').output

My expected output is whether ExecutePipeline is "Succeeded" Or "Failed"

Please provide my the directions to achieve it.


Solution

  • You can pass the expression @activity('Execute Pipeline1').status as the parameter of Stored procedure to return the status of Execute pipeline activity.

    • You can connect the stored procedure activity On completion of execute pipeline. enter image description here

    • In this demo, I used a set variable activity, and a variable is defined with the expression @activity('Execute Pipeline1').status in the activity.

    enter image description here

    Output When execute pipeline activity is succeeded: enter image description here

    When execute pipeline activity is failed: enter image description here