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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Soumya_M
Contributor II
Contributor II

window function in talend

Q. I have a table with 2 columns -A_number and B_number. For every A_number I need to get the count of unique B_number associated with it and also in the third column count of  unique numbers should be displayed. I achieved this in SQL using window function count, for the count column. But I'm finding it difficult to implement this in Talend.

SQL resultant table looks like this

0695b00000WtpIxAAJ.png

Any suggestions how to implement it in Talend?

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

You can use those SQL functions in your query bringing in the data if you wish.

 

A slightly more complicated way of doing it is to use a tSortRow component to sort by columns A and then B, then look for changes between the rows in a tMap. Whenever a row is matched with the previous row for column A, column B will be counted if it is different to the previous column B value. By sorting in this way, you will only need to read the complete data set once

View solution in original post

1 Reply
Anonymous
Not applicable

You can use those SQL functions in your query bringing in the data if you wish.

 

A slightly more complicated way of doing it is to use a tSortRow component to sort by columns A and then B, then look for changes between the rows in a tMap. Whenever a row is matched with the previous row for column A, column B will be counted if it is different to the previous column B value. By sorting in this way, you will only need to read the complete data set once