[resolved] in tMap compare 2 strings which come from 2 files
Hi everybody,
in my tMap i have 2 files (input), in each file there is 2 column "Name" and "status" in the column name there are different name and in the column status there is "active" or "inactive". The first file is about last month (April) and the second is about this month (may).
i want to compare the name which were "active" last month to the name which are "inactive" this month and when there is someone who were "active" then "inactive" i want to put his name out
I try with this expression:
"row1.User_Status.contains("Active") && row2.User_Status.contains("InActive") ?true : false"
but it doesn't work.
can you help me??
Hi, Whats the problem with the output you are getting with this? Can you paste the sample output you are getting? Join between the two files are all properly made?
this is my Excel output (i take of all the column by my self) if my job works i should got only 6 lines and i check in my files and all the the lines i got in my excel file output corespond to name wich are inactive in april and inactive in may
@Mallee:
You'd have been getting organisation names which were having Inactive status in April and May because you are using "contains" in your expression editor. It should have been "equals".
your expression should read as below:
"row1.User_Status.equals("Active") && row2.User_Status.equals("InActive") ?true : false"
Also i have got couple of questions in your job design
1.Why you are using User_Status as key for joining row1 and row2. Is Organisation_name not enough for keying purpose?
2.Are you using inner join between row1 and row2?
Let me know if you are still hit with problems.
hi, your right i don't need to use user_status as a key join and no i'm not using inner join !
but it still not working
I try to use the expression with equals instead of contains but when i do this and i run my job, my excel file output is empty