Dynamic table loading

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
balu536
Premium Member
Premium Member
Posts: 103
Joined: Tue Dec 02, 2008 5:01 am

Dynamic table loading

Post by balu536 »

Hi,
I have a requirement where to load data coming from multiple sequential files to different target tables. The table that need to be loaded for a particular file will be available in a lookup table where we'll lookup on file name and get the table name that needs to be loaded. My query is how to load the respective target table after fetching the name from the lookup table.

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

Post by ray.wurlod »

Do the lookup in a sequence and pass the table name to the job as a parameter.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
balu536
Premium Member
Premium Member
Posts: 103
Joined: Tue Dec 02, 2008 5:01 am

Post by balu536 »

Please explain me how to do this.

Thanks in Advance.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Do all of these target tables have identical metadata?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The sequence has two jobs, one to read the table name based on the file name (presumably a sequence parameter) and load that into its user status area. The second job does the load, with the table name passed as a parameter value whose value is obtained from the $UserStatus activity variable of the first job.

Because it processes at most one row, the first job should be a server job.
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