'Easiest way to fail pipeline in Data Factory?

I have a data factory pipeline that has an "If Condition" Activity and I want the pipeline to fail on a certain condition. What is the best way to achieve this? There is no fail activity..



Solution 1:[1]

Update September 2021: There is now a Fail activity in ADF.

First of all, please vote for this feedback. This is a common need.

There are several workarounds such as a Web Activity to throw an error by trying to connect to https://ThrowAnError or a Stored Procedure activity which executes a raiserror function in Azure SQL Database. But that’s as close as we can get to solving your problem currently.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Community