Error Rerunning Failed Data Factory Pipeline from Failed Activity with a Secure Output Activity

Connor Welham 0 Reputation points
2024-09-27T03:46:18.1166667+00:00

Hi all,

I have a pipeline in Azure Data Factory that is run each day, which is made of several execute pipeline activities. Some of these pipelines have web activities in them which use secure output.

Daily Pipeline

Pipeline with Secure Output

The error I am facing is that on occasion, one of the pipelines in the daily pipeline fails due to a server error, which can be fixed by rerunning the activity. My intention would be to rerun the daily pipeline from the failed activity. When this occurs, the pipeline runs from start to finish but skips over all activities that were previously run.

An error occurs when it tries to skip over the execute pipeline activity that contains a secure output web activity in it, which has already run. I get the following error:

Error encountered: Failed with message Activity 'ba63dcb2-1343-5642-a7b9-6753b1b2b5423' references the SecureOutput from previous activity 'Get app id'. Since ADF does not cache secure output, please rerun from activity 'Get app id' or rerun the whole pipeline run instead

Is there any way to fix this so that I can rerun from the failed activity and successfully skipping over the run pipeline with a secure output?

Thanks for any help

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

2 answers

Sort by: Most helpful
  1. Sina Salam 10,261 Reputation points
    2024-09-27T14:23:34.6033333+00:00

    Hello Connor Welham,

    Welcome to the Microsoft Q&A and thank you for posting your questions here.

    I understand that you are having "Error Rerunning Failed Data Factory Pipeline from Failed Activity with a Secure Output Activity" and according to your question.

    There are ways to fix it, and you can rerun from the failed activity and successfully skipping over the run pipeline with a secure output in Azure Data Factory.

    1. Since Azure Data Factory does not cache secure output, you need to rerun the pipeline from the activity that generates the secure output. In your case, rerun from the 'Get app id' activity. This ensures that the secure output is regenerated and available for subsequent activities.
      1. Determine which activity in the pipeline failed.
      2. Modify the pipeline to allow reruns from the point of failure. This might involve using a control flow activity like If Condition or Switch to check the status of the previous run.
      3. Make sure that the rerun logic includes steps to regenerate any secure outputs that were not produced due to the failure.
    2. Implement checkpoints in your pipeline to save the state of the pipeline at various stages. This way, you can restart the pipeline from a specific checkpoint rather than from the beginning. But you need to plan carefully.
    3. You can also use the 'On Failure' path in your activities to trigger specific actions, such as sending notifications or retrying the failed activity by implement error handling.
    4. Then, if you can configure retry logic for activities that are prone to transient errors. This can help mitigate issues caused by temporary server errors without requiring a full pipeline rerun.

    Check out the links for more steps: https://video2.skills-academy.com/en-us/azure/data-factory/tutorial-pipeline-return-value and https://azure.microsoft.com/en-us/blog/rerun-activities-inside-your-data-factory-pipelines

    I hope this is helpful! Do not hesitate to let me know if you have any other questions.


    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.

    0 comments No comments

  2. Pinaki Ghatak 4,210 Reputation points Microsoft Employee
    2024-09-27T18:28:42.68+00:00

    Hello @Connor Welham

    It seems that the error you are facing is due to the fact that Azure Data Factory does not cache secure output, which is causing the pipeline to skip over the execute pipeline activity that contains a secure output web activity in it, which has already run.

    To fix this issue, you can try rerunning the pipeline from the activity that produced the secure output, which in your case is the Get app id activity.

    Alternatively, you can rerun the entire pipeline run instead of just the failed activity.

    If you want to rerun the pipeline from the failed activity, you can try modifying your pipeline to store the secure output in a persistent location, such as Azure Blob Storage or Azure Data Lake Storage, instead of using the secure output feature.

    This will allow you to rerun the pipeline from the failed activity without encountering the error you are facing.

    Another option is to use the activity-level retry feature in Azure Data Factory. You can set the retry count on the execute pipeline activity that contains the secure output web activity. During the pipeline execution, if this activity run fails, the next automatic retry will start from the last trial's failure point.

    I hope this helps

    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.