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.
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
Thanks in advance.
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.
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Find out about Talend Open Studio for Data Quality
Learn how to enable Data Governance
Take a peek at the definitive guide to Government Data Quality