Dynamic SQL

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
vinodhraj
Participant
Posts: 53
Joined: Mon Sep 12, 2005 6:51 am

Dynamic SQL

Post by vinodhraj »

hi,

I am having a mapping table consists of many table names and columns and these data were available in the database.Eg:

tablename columns functype1 functype
row1 x1 name1, Id1,sal1 y1 z1
row2 x2 name2,Id2,sal2 y2 z2


using functypes, tablename and columns have to identified and metadata of the tables i.e columns has to be loaded dynamically in the DS job.

Iam doing this job using Stored procedures (dynamic SQL) and called in DS. Is there any method in DStage without using routines.

Any solution, thanks

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

Post by ray.wurlod »

DataStage is driven by metadata, and therefore does not have "dynamic metadata" as you desire.

However, if you search the forum, you will find solutions to this question, for example loading partial or even entire SQL statements into job parameters.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vinodhraj
Participant
Posts: 53
Joined: Mon Sep 12, 2005 6:51 am

Post by vinodhraj »

hi ray,

If Iam having the mapping table and related tables in txt files, is it possible to achive in routines. if so pl. guide me

thanks

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

Post by ray.wurlod »

Metadata must be loaded statically into DataStage jobs. End of story.

You can use dynamic SQL, but the columns involved must exactly match the columns defined in the link properties.
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