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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] Problem in tUniqRow and tMap

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??

Thanks and Regards,
Akshath Hegde
Labels (2)
12 Replies
Anonymous
Not applicable
Author

hi,
Thank you for response. Will you please look into snap shots which sabrina posted. in that sorted and everything you will get to know. and input also i have mentioned in my previous post.
don wanted to tell this but Have to tell now, talend people least bothered of our posts!!! some component is not working as per our requirement, example tsortRow And tUniqueRow.
i want unique dates from these input (ignore the time in tMap):
2014-03-04 10:20:02
2014-03-05 11:20:05
2014-03-05 10:20:02
2014-03-04 10:25:02
2014-03-04 10:20:02
2014-03-05 11:20:05
2014-03-05 10:20:02
2014-03-04 10:25:02
2014-03-04 10:20:02
2014-03-05 11:20:05
2014-03-05 10:20:02
2014-03-04 10:25:02
2014-03-04 10:20:02
2014-03-05 11:20:05
2014-03-05 02:00:00
2014-03-04 11:00:00
so output should be :
2014-03-04
2014-03-05
We have date format in tsort and tUniqueRow (i.e. we can select only yyyy-MM-dd from yyyy-MM-dd HH:mm:ss)
but its not working only.
sabrina posted answer like this :
2014-03-04
2014-03-04
2014-03-04
2014-03-05
2014-03-05
2014-03-05
for anybody this final result looks like unique!!!! both "2014-03-04" and "2014-03-05" displayed three times!!

-akshath
Anonymous
Not applicable
Author

Hi Akshath,
As you said that to ignore time in tmap,
I have create a job in such a way that to meet your requirement and got the output like "2014-03-04" and "2014-03-05".
tFileinputDelimited--(main)--tjavarow--(main)--tuniquerow--tlogRow.
i have taken input as string and if you want in date format you can use tconvertType after tuniqueRow.
The code i have used in tJavaRow is
output_row.START_TIME=TalendDate.formatDate("yyyy-MM-dd",
TalendDate.parseDate("yyyy-MM-dd", input_row.START_TIME));.
0683p000009MDJv.png
Anonymous
Not applicable
Author

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.

Thanks and Regards,
Akshath Hegde