Hi,
Suppose I have data which has 3 columns - emp_id, emp_name and mgr_id where mgr_i is emp's manager's id.
I need to know how many employees are there who does not manage anyone.
One approach might be self join but is anybody having any idea how it can be implemented in datastage without using self join?
self join
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 79
- Joined: Thu Mar 22, 2007 4:58 pm
- Location: USA
I am curious if this is an interview question or if something in particular has prompted this??? Looking at your other posts it is hard to tell since it looks like you have some knowledge of the tool, but with curious gaps.
I am hoping that this means you are working at a licensed client and are being asked to do things that require you to learn more about the tool. Just in case I am wrong, my answers are going to be abbreviated so that the full answer can be worked out rather than answer in full.
Assuming by self-join that you mean a join in the database, then yes - there are several options you can choose in DS. The first methods that I can think of off the top of my head include:
1) a funnel and aggregator
2) using a reject link
3) using merge.
If this comes across as too cynical, I apologize in advance.
I am hoping that this means you are working at a licensed client and are being asked to do things that require you to learn more about the tool. Just in case I am wrong, my answers are going to be abbreviated so that the full answer can be worked out rather than answer in full.
Assuming by self-join that you mean a join in the database, then yes - there are several options you can choose in DS. The first methods that I can think of off the top of my head include:
1) a funnel and aggregator
2) using a reject link
3) using merge.
If this comes across as too cynical, I apologize in advance.
Jack Thornton
----------------
Spectacular achievement is always preceded by spectacular preparation - Robert H. Schuller
----------------
Spectacular achievement is always preceded by spectacular preparation - Robert H. Schuller
-
- Premium Member
- Posts: 79
- Joined: Thu Mar 22, 2007 4:58 pm
- Location: USA