Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Team,
I m trying to compare data in two excels using Tmap and create a excel output which will have all the records that dont match.My excel data has an ID column and few other columns like Age, Gender, Address, etc. I am able to compare the excels and pin point which ID has mismatches. But unable to identify the column having differences. I tried using the Tmap expression, and the test button there gives me correct result, but final data is not showing proper.
This was my excel input :
id | Age | Gender |
123 | 25 | Female |
Look Up input :
id | Age | Gender |
123 | 24 | Female |
And my output came out as below:
id | Age | Gender |
123 | Not Equal | Not Equal |
Gender being same gave me 'Not Equal'
I gave my tmap expression as :
row1.Age == row2.Age , but didnt work. Tired converting to string as below. But that too failed.
String.valueOf(row1.Age) .equals(String.valueOf(row2.Age)) ? "Equal" : "Not Equal"
Please help!
Hi,
Along with id join age as key column and try inner join.To catch the reject set inner join reject true.
Hi Priya,
I am attaching he mapping and tmap settings.
I have created two variables with string datatype
row2.age.equals(row2.age)?"Equal":"Not Equal"
row1.gender.equals(row2.gender)?"Equal":"Not Equal"
Let me know if it worked.
I Have given inner join true to get the rejected records.
And have attempted the same settings, but still throwing me a 'Not Equal' result.
hi priyajr,
dont check ineer join on all the columns.just do on ID column.
Hi Aaryan,
I had tried that as well, but in that case i m not getting the rejected records in my file.