Compare if contents of list 1 is a full intersection of contents of list 2

Great find @ipazin, was looking for something like that and went the coding route in the meantime :slight_smile: While at it, I connected the full sample table to the node and it appears to do something undesired.

For row 2, the input from table2 is R, A, T while in the string A, T, R is present. The subset node somehow manages to change this to SubsetValues A, R, T. Since this is not present in table2, no match is found for ID3.

row5, which is an exact match also gets left behind because A, T, R is also used here as SubsetValues.

Noticeably for ID 2 (B, I), this issue does not appear. It finds B, I in its original sequence in row0 + row4 and in random order in row3.

This makes me believe that SubsetValues is sorted alphabetically automatically.
@yanbeemwe Something to take into account when constructing your table2 :wink:

If you want to care of this automatically, use a Column Expression node and use the arraySort() function after creating the collections from table2.

Note: the subset nodes disregards no matches so if you want to get to your final table, add a Joiner at the end with a left outer join.

It will get you the desired result:

image

4 Likes