Page 1 of 1

Regarding logic

Posted: Thu Apr 08, 2010 11:30 pm
by sandeepsreedhar
Hi,

we have a following requirement. We will be getting a source file which contains details of an EMPLOYEE ID and SUPERVISOR ID. We need to find out all the direct and indirect EMPLOYEE IDs under a particular SUPERVISOR. For example

Employee Supervisor

E1 S1
E2 S1
S1 S2

The employees under supervisor S2 should be E1,E2,S1.


Can anyone help me on this please

Posted: Thu Apr 08, 2010 11:46 pm
by ray.wurlod
That's not an ETL task - it's a reporting task. Most reporting tools can perform this kind of query.

Posted: Fri Apr 09, 2010 6:08 am
by chulett
What database do you have at your disposal? Are you allowed to create temp/work tables in it?

Posted: Fri Apr 09, 2010 8:55 am
by DSguru2B
For oracle you can use 'connect_by()', for db2 use the 'with' expression.

Posted: Fri Apr 09, 2010 6:07 pm
by ray.wurlod
Hashed files ("UniVerse" tables) use WITHIN.

Posted: Sun Apr 11, 2010 11:32 pm
by sandeepsreedhar
Hi,

Database used is DB2. Yeah we can create temporary tables,

Regards,

Sandeep

Posted: Mon Apr 12, 2010 11:40 pm
by sandeepsreedhar
Hi Ray,

I cant get you.
Can we do this activity using datastage?

Regards,

Sandeep

Posted: Tue Apr 13, 2010 2:48 am
by ray.wurlod
For a small number of possible levels yes. But it's not what DataStage is intended to do.