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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
jerownimow
Contributor III
Contributor III

How to create hierarchical output from one source file without using too many tHashInput as a lookup?

Hi Folks,

 

I'd like to know your inputs on how to create a hierarchy from one source file without using too many tHashInputs as a lookup. See requirements and expected output below:

Input
|Emp Name       | Emp Id | Manager Id|
|--------------------------------------------------|
|Jerome Sare    | JNS12  | MR13        |
|Madey Den      |  MR13  | MB14         |
|Mike Bick         | MB14   | TS15          |
|Trevlin Sucre   | TS15    | DS16          |
|Dicker Sipeds  | DS16   | VS17           |
|Vander Sicken | VS17   | VS17           |

 

Expected Output
Emp Name      | CEO_LVL1       | CEO_LVL2     | CEO_LVL3    | CEO_LVL4
-------------------------------------------------------------------------------------------------
Jerome Sare    | Vander Sicken | Dicker Sipeds | Trevlin Sucre | Mike Bick
Madey Den      | Vander Sicken | Dicker Sipeds | Trevlin Sucre | Mike Bick
Mike Bick         | Vander Sicken | Dicker Sipeds | Trevlin Sucre |
Trevlin Sucre   | Vander Sicken | Dicker Sipeds |                       |
Dicker Sipeds  | Vander Sicken |                        |                       |
Vander Sicken | Vander Sicken |                        |                       |

 

CEO_LVL1 = Emp Id is equal to manager Id that will be CEO_LVL1, then it will traverse down up to 4 levels to get the CEO_LVL2 - CEO_LVL4.

Let me know your thoughts on this.

Thank you.

 

Labels (2)
14 Replies
jerownimow
Contributor III
Contributor III
Author

@uganesh,

 

Here's the sample file and talend job that I modified based on the attachment you've provide.
Thank you very much. 


ed_users_ceo_hier1.txt
Hierarchy_Copy.zip
akumar2301
Specialist II
Specialist II

Find attached a simple job with Hash.
 
 
jerownimow
Contributor III
Contributor III
Author

Thank you @uganesh, I tried executing the job and it doesn't go into loop like the ones you've provided me before. I'm currently in-progress with troubleshooting..Please advise.

Thank you so much!

Anonymous
Not applicable

Anonymous
Not applicable

Where is the attachment