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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
satyavar
Contributor III
Contributor III

[resolved] How to fetch Count in TALEND

Hi
Here is what I am trying to do:
I have Oracle as Source and Destination is SQL. My requirement is to join 2 tables in Oracle on Org Id field and load the output to SQL Server.
Please let me know how to achieve this?
Table 1:
Org Id | Org Name
------- ----------
1        | Org 1
---------- --------
2        | Org 2
---------- --------
3        | Org 3
---------- --------
4        | Org 4
---------- --------
5        | Org 5
******************************************************************
Table 2:
Emp Id | Org Id | Emp Name
-------- -------- -------
1         | 1         | abcxyz
-------- -------- -------
2         | 2         | abcxyz
-------- -------- -------
3         | 3         | abcxyz
-------- -------- -------
4         | 1         | abcxyz
-------- -------- -------
5         | 1         | abcxyz
-------- -------- -------
6         | 3         | abcxyz
-------- -------- -------
7         | 1         | abcxyz
-------- -------- -------
8         | 2         | abcxyz
-------- -------- -------
9         | 2         | abcxyz
-------- -------- -------
10        | 1         | abcxyz
-------- -------- -------
11        | 2         | abcxyz
-------- -------- -------
12        | 3         | abcxyz
-------- -------- -------
13        | 1         | abcxyz
-------- -------- -------
14        | 1         | abcxyz
-------- -------- -------
15        | 1         | abcxyz
-------- -------- -------
Now I want to fetch the number of employees foreach Org Name. My output should look something like below:
Expected Output
Org Name | Count
---------- --------
Org 1        | 8
---------- --------
Org 2        | 4
---------- --------
Org 3        | 3
Thanks
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi kalyan,
Following is the result of the above configuration...
connected
 Org 1|8
 Org 2|4
 Org 3|3
disconnected
Following were changes..
Add count column in tMap output as integer
Use count column in operations... check screenshot below.
0683p000009MBB7.png
0683p000009MB3i.png
thanks
vaibhav

View solution in original post

5 Replies
Anonymous
Not applicable

Hi,
Use tMap, innerJoin, and they taggregaterow with count function....
Vaibhav
satyavar
Contributor III
Contributor III
Author

I tried the same (tMap -> InnerJoin -> tAggregateRow -> tSortRow) but i am getting count as 0
Anonymous
Not applicable

Show your tMap configuration? how many rows you are receiving at the output of your tMap? which aggregate column you are using?
Anonymous
Not applicable

hi
could be something like

0683p000009MBAx.png 0683p000009MBB2.png 0683p000009MB55.png
Read & test example on different component from Talend Help
NOtice I aggregate first and join looking for the name i expected after
regards
laurent
Anonymous
Not applicable

Hi kalyan,
Following is the result of the above configuration...
connected
 Org 1|8
 Org 2|4
 Org 3|3
disconnected
Following were changes..
Add count column in tMap output as integer
Use count column in operations... check screenshot below.
0683p000009MBB7.png
0683p000009MB3i.png
thanks
vaibhav