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)
1 Solution

Accepted Solutions
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

View solution in original post

12 Replies
Anonymous
Not applicable
Author

Hi,
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
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

hi,
Here is input file data:
START_TIME
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

job structure :
tfileinputde--- > tMap---> tsort--> tuniqueRow---unqiues-- >tlogrow
data type in tFileInputDel : Date (format: yyyy-MM-dd HH:mm:ss)
Expected Output:
2014-03-05
2014-03-04
0683p000009MDEE.png 0683p000009MDJl.png
Anonymous
Not applicable
Author

hi,
Anybody please suggest any solution for above problem.
Thanks and Regards,
Akshath Hegde
Anonymous
Not applicable
Author

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
0683p000009MDJq.png
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

hi,
Anybody know how can we resolve this problem?? please let me know how to resolve this one.
Thanks and Regards,
Akshath Hegde
janhess
Creator II
Creator II

What do you get as your sorted output - you haven't said.