filter condition

arkiboys 8,961 Reputation points

In the pipeline I am using a lookup to read a .csv file and then using a filter activity as follows:
Items --> @activity('LookupConfig').output.value
Condition --> @equals(item().FileName, pipeline().parameters.pl_FileName)

Straight after the filter activity, I have a success line going to another activity...

If the filter does not return the condition correctly , then I want to have a failure.
How do I make the filter to fail if the condition becomes false?

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

Accepted answer
  1. AnnuKumari-MSFT 26,716 Reputation points Microsoft Employee

    Hi @arkiboys ,
    As per your ask- 'If the filter does not return the condition correctly , then I want to have a failure.'
    If I understood your requirement correctly, you want to see pipeline failure if the filter activity doesn't meet the condition. That means, if filter activity returns no output, please correct me if I am wrong.

    Also, other approach could be to use IF block instead of Filter activity and specify you condition in If block expression and use Set variable activity in True block and Fail activity inside False block.


    If the suggested response helped you, please click Accept Answer and kindly upvote the same. If you have extra questions about this answer, please Comment.

1 additional answer

Sort by: Most helpful
  1. AnnuKumari-MSFT 26,716 Reputation points Microsoft Employee

    Hi @arkiboys ,
    Thankyou for using Microsoft Q&A platform and posting your query.

    You can use Fail activity , which has been newly introduced in ADF after filter activity to achieve this requirement.


    Hope this will help. Please let us know if any further queries.


    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you.
      Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators