Page 1 of 1

Capturing Source and Target Table Names

Posted: Tue Mar 11, 2008 4:07 pm
by r_arora
Hello,

I have a requirement to capture the names of the source and target tables/files used in the parallel job.
For Example: If I have 3 sources A,B and C, I need to assign A|B|C (concatination of Source Table Names A,B and C) and store it in a parameter and later assign this value of the parameter to a column in a sequential file.Similar logic for the Target Table Names/Files. Values should be dynamically assigned for different jobs.

Any suggestions how Can I implement this is datastage?Any inputs will be greatly appreciated.

Thanks

Posted: Tue Mar 11, 2008 7:29 pm
by kduke
Even if you can extract this from DS_JOBOBJECTS then you may not get what you want. If you are using user defined SQL then you may need to parse the SQL to extract the table naames. One of the jobs in EtlStats extracts the properties of custom stages. This is almost always where PX jobs store target table names. These are stored in pairs, the property name along with its value. You have to browse the results to see what your stage types call the name for tables.

You still need to extract the sources. Hacking out a result for sources could take you a while.