Search code examples
difftalend

Talend - compare 2 files and keep entries that are not common to both


I follow this solution to compare two files in Talend Open Studio.

It's seem to work but in my output file, I only have commas for each line. But the number of lines is correct.

I don't understand why.


Solution

  • It sounds like you're not properly defining an output schema and the associated data for the defined columns.

    Your tMap should look something like this:

    tMap configuration

    Where I've joined 2 files that have an id, a name and an age.

    What is worth mentioning is that Gabriele's answer in that question will only test the diff one way. To get a bidirectional diff of the files you'll want to replicate the job and switch the main flow and the lookup of the files and output both of these to a tBufferOutput component and then read them back in with a tBufferInput component and output this as your diff file.

    So your job might end up looking like this:

    job set up