Page 1 of 1

Someone help

Posted: Sat Jan 09, 2010 2:02 pm
by shank
I have 2 files as follows

File1

Emp ID | Salary
1|30000
2|24000
3|9000
...
and so on.

File 2

Lower Salary Value | Higher Salary Value | Grade
25000|30000|A
20000|25000|B
5000|10000|C
...
and so on.

My output file should be something like..
Emp ID | Grade
1|A
2|B
3|C
..
and so on..

How can I achiece this without having a common key column in my input datasets?
Can anyone help?

Posted: Sat Jan 09, 2010 2:52 pm
by anbu
Add integer key to both dataset and use lookup on the integer key and set multiple rows returned link to secondary link and send the output to transformer where add a constraint sal >= low sal and sal <= hi sal

Emp ID | Salary |Key
1|30000 |1
2|24000 |1
3|9000 |1

Lower Salary Value | Higher Salary Value | Grade |Key
25000|30000|A |1
20000|25000|B |1
5000|10000|C |1

Posted: Sat Jan 09, 2010 8:17 pm
by ray.wurlod
Welcome aboard.

Server or parallel job? You have posted in the server job forum but have marked the job type as parallel. The techniques are different in each.

The short answer in each case, though, is to add the common key within the DataStage job design.