Regarding logic

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
sandeepsreedhar
Participant
Posts: 15
Joined: Mon Dec 21, 2009 12:49 am
Location: India

Regarding logic

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

That's not an ETL task - it's a reporting task. Most reporting tools can perform this kind of query.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

What database do you have at your disposal? Are you allowed to create temp/work tables in it?
-craig

"You can never have too many knives" -- Logan Nine Fingers
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

For oracle you can use 'connect_by()', for db2 use the 'with' expression.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Hashed files ("UniVerse" tables) use WITHIN.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
sandeepsreedhar
Participant
Posts: 15
Joined: Mon Dec 21, 2009 12:49 am
Location: India

Post by sandeepsreedhar »

Hi,

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

Regards,

Sandeep
sandeepsreedhar
Participant
Posts: 15
Joined: Mon Dec 21, 2009 12:49 am
Location: India

Post by sandeepsreedhar »

Hi Ray,

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

Regards,

Sandeep
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

For a small number of possible levels yes. But it's not what DataStage is intended to do.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply