Deactivate an Activity

APPLIES TO: Azure Data Factory Azure Synapse Analytics

Tip

Try out Data Factory in Microsoft Fabric, an all-in-one analytics solution for enterprises. Microsoft Fabric covers everything from data movement to data science, real-time analytics, business intelligence, and reporting. Learn how to start a new trial for free!

You can now deactivate one or more activities from a pipeline, and we skip them during validation and during pipeline run. This feature significantly improves pipeline developer efficiency, allowing customers to comment out part of the pipeline, without deleting it from the canvas. You may choose to reactivate them at a later time.

Screenshot showing an inactive activity in pipeline

Deactivate and Reactivate

There are two ways to deactivate an activity.

First, you may deactivate a single activity from its General tab.

  • Select the activity you want to deactivate
  • Under General tab, select Inactive for Activity state
  • Pick a state for Mark activity as. Choose from Succeeded, Failed or Skipped

Deactive one activity at a time

Alternatively, you can deactivate multiple activities with right click.

  • Press down Ctrl key to multi-select. Using your mouse, left click on all activities you want to deactivate
  • Right click to bring up the drop down menu
  • Select Deactivate to deactivate them all
  • To fine tune the settings for Mark activity as, go to General tab of the activity, and make appropriate changes

Deactive multiple activities all at once

In both cases, you do need to deploy the changes to deactivate the parts during pipeline run.

To reactivate the activities, choose Active for the Activity State, and they revert back to their previous behaviors, as expected.

Behaviors

An inactive activity behaves differently in a pipeline.

  1. On canvas, the inactive activity is grayed out, with Inactive sign placed next to the activity type
  2. On canvas, a status sign (Succeeded, Failed or Skipped) is placed on the box, to visualize the Mark activity as setting
  3. The activity is excluded from pipeline validation. Hence, you don't need to provide all required fields for an inactive activity.
  4. During debug run and pipeline run, the activity won't actually execute. Instead, it runs a place holder line item, with the reserved status Inactive
  5. The branching option is controlled by Mark activity as option. In other words:
    • if you mark the activity as Succeeded, the UponSuccess or UponCompletion branch runs
    • if you mark the activity as Failed, the UponFailure or UponCompletion branch runs
    • if you mark the activity as Skipped, the UponSkip branch runs
    • for more information, please refer to Conditional Execution

Screenshot showing activity run status of an inactive activity

Best practices

Deactivation is a powerful tool for pipeline developer. It allows developers to "comment out" part of the code, without permanently deleting the activities. It shines in following scenarios:

  • When developing a pipeline, developer can add place holder inactive activities before filling all the required fields. For instance, I need a Copy activity from SQL Server to Data warehouse, but I haven't set up all the connections yet. So I use an inactive copy activity as the place holder for iterative development process.
  • After deployment, developer can comment out certain activities that are constantly causing troubles to avoid costly retries. For instance, my on-premises SQL server is having network connection issues, and I know my copy activities fail for certain. I may want to deactivate the copy activity, to avoid retry requests from flooding the brittle system.

Known limitations

An inactive activity never actually runs. This means the activity won't have an error field, or its typical output fields. Any references to missing fields may throw errors downstream.

Learn more about Azure Data Factory and Synapse pipelines.