Get Status of Pipeline triggered

Nandan Hegde 32,416 Reputation points MVP
2020-08-06T05:48:28.48+00:00

Hi All,

we have a below scenario wherein we are triggering ADF piplelines via another ADF pipeline through web activity :

url": "https://management.azure.com/subscriptions/<<SubscriptonId>>/resourceGroups/<<RGname>>/providers/Microsoft.DataFactory/factories/<<DFName>>/pipelines/<<PipelineName>>/createRun?api-version=2018-07-01-preview",
    "method": "POST",

Since its a REST API trigger , the pipeline through which we are triggering another pipeline shows the status as successful even if the pipeline that was triggered is still in progress.

So is there any way via which we can restrict the triggering pipeline to in progress state till the triggered pipeline is completed or is there any way via which I can check the status of the triggered pipeline and keep the main pipeline in untill loop till we get the final status of triggered pipeline

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

Accepted answer
  1. Harish Sunderaraj 176 Reputation points
    2020-08-06T12:19:28.933+00:00

    Hi @Nandan Hegde

    For some reason if you cant use Execute Pipeline because the pipeline is in a different Data factory. You can try below

    Using getting triggered Pipeline status like below

    WebRequest(Create_Pipeline_1) --> Store Pipeline RunId to variable

    Until Activity (if(Variable_Status <> InProgress))
    Inside Until Activity
    WaitActivity(1 Min) --> WebRequest(Get_Pipeline_1_Status using RunId) --> Store_PipeLineStatus to Variable_status)

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. HarithaMaddi-MSFT 10,136 Reputation points
    2020-08-06T08:11:03.22+00:00

    Hi @Nandan Hegde ,

    Thanks for posting the query.

    Web activity will make an asynchronous call to a given API and return a success or failure if no response is received within 1 minute and hence within this, to my understanding, it is not possible to track the pipeline status. This scenario can be easily implemented using "Execute Pipeline" activity that has "Wait for completion" flag as shown below. Another alternative if API needs to be used can be to use Web Hook Activity that has a call back URI option which will wait for the activity to complete until it receives the POST request to the call back URI and hence makes it Synchronous. In this scenario, web hook activity can be associated with "Azure Automation Run Book" that uses Power Shell commands to check the status of the data factory pipeline and sends call back once it is completed.

    Hope this helps! Do let us know for more questions.

    16121-executepipelineactivity.png16000-webhookactivity.png

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.