filter activity criteria

arkiboys 9,706 Reputation points
2022-02-11T10:05:55.897+00:00

Hi,
In the pipeline I am filtering the lookup activity of a .csv file

Inside the condition of filter I have:
@equals(activity('LookupOC').output.value[0]['ID'], add(int(variables('vOID')), 1))

In th eabove expression I am trying to get the row for the ID+1

There is no error but I do not seem to get the filtered row for row with ID=2
Output
{
"ItemsCount": 6,
"FilteredItemsCount": 0,
"Value": []
}

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

Accepted answer
  1. AnnuKumari-MSFT 34,556 Reputation points Microsoft Employee Moderator
    2022-02-11T10:36:05.433+00:00

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

    Here, you are trying to compare string with int value . That's the reason there is no output.

    Use int to convert string to integer value in the first parameter passed in condition as well.

    Here , I used @activity('Lookup1').output.value as item and @equals(int(item().Id),2) as condition in filter activity.

    173561-image.png

    173523-image.png

    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
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.