"Disjunctive union" or "Symmetric difference" of two input sets

Nine Stars

"Disjunctive union" or "Symmetric difference" of two input sets

Hi, is there a way to accomplish this with two input sets, e.g. a main and a lookup to a tMap?


Basically, I have two input sets, A and B, that I want to inner join on a single key.  I want two output to sets: one with the elements of A that are not in B, let's call this C, and one with the elements of B that are not in A, let's call this D.


I used a tMap and created two outputs, both with "Catch lookup inner joint reject" set to true.  The expression in each output specifies that the key from the other data set has to be null.  In this example A is the main, B is the lookup.  Only the C set was created correctly, e.g. the one that contains the main rows that are not in the lookup.  The D set was never created.


I suspect that this cannot be done with a single tMap, but I was hoping to do it with just one.


I think I can do it with two tMaps.  I would use a tReplicate to clone each data set and put set A as main and B as lookup into one tMap to generate C and B as main and A as lookup in another to generate D.


Thanks for any input.



Please give Kudos and mark topics as solved where appropriate.

Re: "Disjunctive union" or "Symmetric difference" of two input sets


Could you please elaborate your case with an example with input and expected output values?

Best regards


Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.


Talend named a Leader.

Get your copy


Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables


Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables


Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema