Share via

@and inside filter activity

arkiboys 9,711 Reputation points
2022-02-10T22:51:43.087+00:00

Hello,
Inside the pipeline, after the lookup, I have a filter activity inside which this condition works

Expression:

------------

@ANDO (
equals(item().OName, variables('vOName')),
equals(item().PName, variables('vPName'))
)

Question

What is the expression to have three equalities
(OName = vOName and PName = vPName and DName = vDName)

Perhaps something like below? but it does not work:
@ANDO (
equals(item().OName, variables('vOName')),
equals(item().PName, variables('vPName')),
equals(item().DName, variables('vDName'))
)

Azure Data Factory
Azure Data Factory

An Azure service for ingesting, preparing, and transforming data at scale.

0 comments No comments

Answer accepted by question author

KranthiPakala-MSFT 46,827 Reputation points Moderator
2022-02-11T00:44:40.633+00:00

Hello @arkiboys ,

Thanks for the question and using MS Q&A platform.

As we understand the ask here is that you would like to validation 3 conditions using and function in ADF but it is throwing an error. Please correct if I'm not accurate.

The AND function in ADF only accepts only 2 arguments [for eg: and(<expression1>, <expression2>)]. If you pass more than 2 arguments, it will throw an error.

For your scenario you can have additional and function to validate if the 3 conditions are true. See below sample:

@and(and(equals(item().OName, variables('vOName')),equals(item().PName, variables('vPName'))), equals(item().DName, variables('vDName')))

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

Was this answer helpful?


0 additional answers

Sort by: Most helpful

Your answer

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