Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I was trying to get the employees reportees list as (Ex: - A|B|C|D|E)
I am a newbie to talend, so i was little consfused about what are the components to use, and how to use, what sort of java code that i have write( zero knowledge of java ).
So i thought i could get help from the community.
Now coming to the problem statement.
Sample Data:-
EmpID|Name|ManagerID
101 | A | 10 |
102 | B | 11 |
10 | C | 1 |
11 | D | 1 |
1 | E | null |
1:- get the employees reportess as below.
EmpID Name Path 101 A 101|10|1 102 B 102|11|1 10 C 10|1 11 D 11|1 1 E 1
Please help.
Thanks in advance.
Mohan V.
Is talend community is helpful.???
I am facing with the same scenario in my work using Talend. Expecting an answer for the same.
I was facing the same issue, i found a way to simplify the process with Oracle DB function CONNECT BY.
You can have the level with LEVEL.
You can specify the start (CEO, KING, TOP hierarchy) of your hierachy with START WITH.
You can get all the leaf (end of a branch of the tree) with CONNECT_BY_ISLEAF (1 = Leaf = no one after this person, 0 = Branch).
You can get the path (King/Prince/Someone1/Someone2, etc) with SYS_CONNECT_BY_PATH(name, '/') "Path".
I suggest you to do a data preparation with the database. In Oracle there is the function CONNECT_BY (https://docs.oracle.com/cd/B19306_01/server.102/b14200/queries003.htm) used for hierachical queries. It will do all the preparation, then you just have to test the level returned by the query in Talend.
Hope it will help.