Page 1 of 1

Dynamic SQL

Posted: Sat Oct 01, 2005 11:22 am
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

Posted: Sat Oct 01, 2005 5:20 pm
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.

Posted: Sun Oct 02, 2005 2:38 am
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

Posted: Sun Oct 02, 2005 4:46 pm
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.