hai, I have two jobs. first job : tfileInputdel --- > tsort----- > tuniqueRow---uniques--->tMap----> mysql second job : tfileInputdelemited---->tMap--- > tsortrow----- > tuniqueRow---uniques--->tfileOutputDel first job working fine. im able to insert unique values to mysql table. but in second job im facing problem. In second job, tsortRow working fine but tUniqueRoe is not giving uniques values. so this is resulting in duplicate values in file. Can anybody explain why this abnormal behavior is happening??
hi,
Thank you BhanuChandar for your answer.
I got the solution for that. my solution as follows.
job design :
tFileInputdel--date format--> tMap ---string format----> tsortRow ---string format--- >tUnique ----string format-- > tLogRow
Field : START_TIME_STAMP (format : "yyyy-MM-dd HH:mm:ss")
my solution is simple: im converting date to string in tMap. just give FormatterUtils.format(row1.START_TIME_STAMP,"yyyy-MM-dd") in expression builder of tMap.
but in second job im facing problem. In second job, tsortRow working fine but tUniqueRoe is not giving uniques values.
You can use tLogrow to print output data from tSortRow on console to see if there is any duplicated row in job 2. How did you set tMap component in job 2? Could you please elaborate your case with an example with input and expected output values? Best regards Sabrina
hi, Thank you for quick reply. For your information, We are using outputfile of second job as input file for 1st job. here goes the explanation: job2 have files with one field. So that field is START_DATE. example: START_DATE: 2014-03-04 2014-03-04 2014-03-04 2014-03-05 2014-03-04 2014-03-04 2014-03-04 2014-03-05 2014-03-05 2014-03-05 as you told i used Logrow but its taking all rows and inserting into output file. but wen i run 1st job its sorting rows properly. whether usage of tMap before tsortRow is making any difference?? so same components giving two different results. its quite confusing. can u please help me to solve it. Thanks and Regards, Akshath Hegde
Hi,
Did you set any expression or filter in tMap of second job? Could you show us this tMap editor screenshot so that we can take a testing to see if it is abnormal.
Best regards
Sabrina
Hi,
I have make a testing for you use case and found job 1 and job 2 have same result. Feel free let me know if I missing.
The actual result should be :
2014-03-04 (10:20:02)
2014-03-04 (10:25:02)
2014-03-04 (11:00:00)
2014-03-05 (11:20:05)
2014-03-05 (10:20:02)
2014-03-05 (02:00:00)(the HH:mm:ss are not displayed according to the date pattern setting yyyy-MM-dd)
Please see my screenshots
Best regards
Sabrina
hi,
Thank you reply. but result should be as follows:
Result :
2014-03-04
2014-03-05
but in your screen shot same date is displayed multiple time. job should display only unique dates.
In resultant LogRow same date displayed more then once. Hope u got my point.
Thanks and Regards,
Akshath Hegde