Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Can we compare a column from two different files in tFileCompare?

I'm trying to compare a column between a source(.txt) and a reference file(.xlsx) and send a notification email(if differences detected) before running a Job. Is this possible to do with tFileCompare ? Or do I need to have same schema for both the files to compare in tFileCompare?
If it can't be done through tFilecompare, Is there any other simple way to compare the files and send a notification email based on the file comparison?

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,

 

    One way is to extract the required columns from both file and write them to temp file and then do file comparison using tFileCompare. Please note that all the records must be in same order in both files and even an extra space will change the result of comparison.

 

    Another way is to read the first file and second file based on inner join on both result sets in tMap. In the output section, activate the boolean value to catch inner join reject records as true. If there is even one record in output section, it means that records from both files are not perfect match!

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

View solution in original post

1 Reply
Anonymous
Not applicable
Author

Hi,

 

    One way is to extract the required columns from both file and write them to temp file and then do file comparison using tFileCompare. Please note that all the records must be in same order in both files and even an extra space will change the result of comparison.

 

    Another way is to read the first file and second file based on inner join on both result sets in tMap. In the output section, activate the boolean value to catch inner join reject records as true. If there is even one record in output section, it means that records from both files are not perfect match!

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved