How to find a value in a List

Comments

2 comments

  • Official comment
    Joel Stewart

    Hello! The example you're describing sounds exactly like the INTERSECTION function from Datameer. The link directs you to the documentation with an example. 

    As for the second part, I assume that by "join" you mean the logical union of the two LIST sets. Using your example, the output of List A [a,b,c] and List B [c,d] would be [a,b,c,c,d] if logically unioned. If that is the case, you can simply use an IF statement to check first if the INTERSECTION of the two LIST sets is empty. If it is empty, return an empty LIST; if it is not empty then return the union of the sets. 

    In Datameer, the logical union of LIST objects is done with the "+" operator. 

    Lastly, if you want to remove duplicates from the union set you can pass the resulting union set through the UNIQUES function.

    Comment actions Permalink
  • Ishfaq

    Thanks a ton :) yes it will solve my issue

    0
    Comment actions Permalink

Please sign in to leave a comment.