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..!!
you can do so by tAggregateRow component by follow below flow:
*group by data/or whatever be a name of column
*operation count(data/or whatever be a name of column)
I think the component you're after is tUniqRow
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.
Can you please more elaborate. I am unable to understand the solution.
My data is in file how can I use tAggregateRow on that.
@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
your output will be :
you can use this result as per your requirement.
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Watch the recorded webinar!
Learn how and why companies are moving to the Cloud
Accelerate your data lake projects with an agile approach
Create systems and workflow to manage clean data ingestion and data transformation.