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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tMD5Sum component

Hi,

 

I had one scenario in which I need to compare the data with in the file. 

for example: file1 has data:

This is book.

This is car.

This is book.

 

In this I need to know how many lines are duplicate.

Thanks in advance..!!

Labels (1)
  • v7.x

7 Replies
vboppudi
Partner - Creator III
Partner - Creator III

Please specify expected output.

 

Regards,

aashish_21nov
Creator
Creator

Hi 

 

you can do so by tAggregateRow component by follow below flow:

 

tfileinput*--> tAggregaterow-->tfileoutput*

 

In tAggregaterow:

*group by data/or whatever be a name of column

*operation count(data/or whatever be a name of column)

Anonymous
Not applicable
Author

Hi,

 

The expected o/p will be:

 

This is book. was come 2 times in a file

 

Regards,

Akash Rastogi

 

David_Beaty
Specialist
Specialist

I think the component you're after is tUniqRow

Anonymous
Not applicable
Author

Hi David,

 

I think tUniqRow component is used to filtering the unique and duplicate records.

But in my scenario I want the exact count how many times that particular sentence had come.

 

-Akash 

Anonymous
Not applicable
Author

Hi Aashish,

Can you please more elaborate. I am unable to understand the solution.

My data is in file how can I use tAggregateRow on that.

 

-Akash

aashish_21nov
Creator
Creator

@rastogi_akashfor reading a file use tfileinputdelimited and let say your file having schema like sentence string type then use tmap and generate output with same sentence column two times,

So now we have two output column first sentence and second column (named as cnt) then add tggregaterow edit schema accordingly change datatype of cnt from string to integer and add sentence to group by and cnt to operation with function type count 0683p000009MACn.png

 

 

your output will be :

sentence;cnt

a;1

b;2

c;1

 

you can use this result as per your requirement.