how to develop datastage job

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
harithay
Participant
Posts: 106
Joined: Tue Dec 14, 2004 10:51 pm

how to develop datastage job

Post by harithay »

Hi all,

i have source input 47 fileds (tab sepearetd), those should be loaded into 5 tables.

8 fields are mapped to table1.


21 fields from source should be eneterd as 21 records in table2,

remaining 18 fields from source should be entered as 18 records in table3.

(table2 and table3 are manually loaded , since they are fixed.).


in table4 the values of 21 fileds should be loaded, in table5 the values of 18 fileds should be loaded.



for example : if there are 10 records in source.

table1 should contain 10 records ( with 8 fields mapping from source)

table2 is always fixed and contains 21 records
table3 is always fixed and contains 18 records.


so table4 contains 210 records
and table5 contains 180 records.

my question is how to develop the datastage jobs using parallel extender.




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

Post by ray.wurlod »

Use Transformer stage to conditionally or unconditionally direct subsets of fields.
Whenever you write "fields to rows" think Pivot stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
T42
Participant
Posts: 499
Joined: Thu Nov 11, 2004 6:45 pm

Post by T42 »

Could use Pivot Stage. Better off using Copy Stage -> Funnel.
harithay
Participant
Posts: 106
Joined: Tue Dec 14, 2004 10:51 pm

Post by harithay »

thanks ray, t42;

but can u explain little more about how to develop job;

the relation between table 1 and table 4 is one ------many
the relation betwwen table 1 and table5 is one-----many

the relation between table 2 and table4 is one-----many
the relation between table3 and table 5 is one----many;

my questions are
1)i am finding diffculty in undestanding how to load table4 ,table5?

2)to load data to table4 from source file wheher i have to use table1 and table2 as lookups;

3)in similar way to load data to table5 from source whether i have to use table1 and table3 as lookups
T42
Participant
Posts: 499
Joined: Thu Nov 11, 2004 6:45 pm

Post by T42 »

Read up the Parallel Development Guide on 'Copy Stage' and 'Funnel Stage'.

For Table 4 - Copy - 21 links -> Funnel -> output

For Table 5 - Copy - 18 links -> Funnel -> output

As for Table 2 and 3, the same thing above can be done, with a remove duplicate stage, or maybe a transformer, or other options to get the first record.

Ray's solution would work too. I just like my solution a bit better. :-)
Post Reply