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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to compare values between two data files

Hi guys,

 

I am trying to compare values between two excel files in talend but not too sure how to do it.

I need to compare if the total number of records in file A is equal to a cell with the sum value in file B. Based on this result i need to run a job to insert records into Salesforce.

Does anyone have an idea how the comparison between 2 data files can be done?

 

 

Labels (3)
5 Replies
Anonymous
Not applicable
Author

Read all records from file A with tFileExcelInput component, then use tAggregate to count the number of rows.  Send the number of rows into a tMap.  On your tMap, lookup the value in file B.  Compare the 2.  And then carry on from there.

 

There is a possibility here to use data preparation, and recipes in Data Prep.  But it will depend on your data and what your logic is.

Anonymous
Not applicable
Author

Refer attached job which will do what you are expecting.

 

1) Below flow is just for logging

 

0683p000009Ls7P.jpg

 

 

2) Change tlog (matched) with your salesforce output to write into salesforce

 

 

0683p000009LsdP.jpg

 

 


Compare_Values.zip
Anonymous
Not applicable
Author

Hi thanks guys.  @sjain & @iburtally

 

I tried using @sjain's flow. however im having trouble with the tMap.

I need to count the number of rows in a particular column of inputExcel1 and check if it matches the value of in a particular cell (B3) in inputExcel2. 

Any idea how the mapping/expression can be defined? 

 

 

 

Anonymous
Not applicable
Author

Hi,

 

Use taggregator to count the records as explain in my job & then use tmap for comparison or join.. 

Anonymous
Not applicable
Author

You want to check the int value from the count, matches the int value from file B.  Just do an var1 == var2