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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
krengan21
Creator
Creator

Count the number of days

Hi there are set of dates 

sno|date|string_received|count

1.2018-04-09  | A  | 1 

2. 2018-04-09 | A | 1

3.2018-04-10 | A |

4.2018-04-09 | B |  1  

5. 2018-04-09 | B |  1

6.2018-04-10 | B |  2 

 

How do i get the count based on the column string received and populate in the count column

Labels (2)
3 Replies
Anonymous
Not applicable

Use the tAggregateRow and group by your date and string_received fields. You will need to use the count function in the output. Take a look here: https://help.talend.com/reader/hm5FaPiiOP31nUYHph0JwQ/yj8JuBj57qWaYoFqIewUiA

 

This will group your data so you will lose rows. If you want to keep your rows you can always carry out this calculation and then join the result back to your original dataset to carry across the count.

krengan21
Creator
Creator
Author

Hi @rhall 

 

Using taggregaterow is taking too much ram which makes the system very slower do u have any other solution other than this ? 

Anonymous
Not applicable

How much data is being processed and have you tweaked your job's RAM settings? There are other ways to do this, but using the tAggregateRow should work pretty well.

 

To increase the RAM for the Studio you can follow this...https://community.talend.com/t5/Migration-Configuration-and/Allocating-more-memory-to-Talend-Studio/...

 

To increase the RAM for just your job you can follow this...https://help.talend.com/reader/mhqCkTBnin7IXmJBUJoocQ/vdAWcdjBpxoiN0aM6d9Oyw

 

If you need to use a different method, you can use a tJavaFlex and a bit of Java code using a HashMap to achieve this count. It will use less memory, but will require a bit more of a complicated configuration.