problem with table subtraction

Hi,

I have a table like this:

key1 key2 num
a b x
a b y
a b z
b a y
b a z
b a q

Now i have a list of num that must be deleted from this table, for example x.

If x is present i must delete also all the rows with the same pair key1/key2.

With this example i need an output table like this:

key1 key2 num
b a y
b a z
b a q

The only solution i have found is attached as image... but take too much time.

  • group loop start with the pair key1/key2
  • set operator with complement mode on num
  • java snippet row filter, if the numbers of rows is changed i remove all the rows

Any other solution?

Thanks

How about first using Column Aggregator node. Choose to Group on columns key1 and key 2, and for aggregation method choose Concatenate. You will now have an extra column with key1 and key2 combined, separated by a commna.

Now use Row Filter node, and filter to only include rows where "num" column is "x".

Now use Reference Row Filter node, and attach the table after the Column Aggregator node to the top port, and attach the table after the Row Filter node to the bottom port (i.e. your reference table). Choose to Exclude Rows from Reference table, and select the combined key1key2 column from both of the dropdowns (Data Table and Reference Table Columns).

Simon.

it works perfect, thanks =)