Passing Dynamic Metadata And Database TableName

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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

bicap wrote:I have to read from Database and write into a DataSet from all the available tables in each schema by using a single DataStage job.
Why?

A DataStage Data Set can only have a single record structure.

So, unless every single one of these tables has the same record structure, or your single DataStage job is going to construct the same record structure (a single string) then your mission is doomed.

Resist stupid requirements!

Now, if your requirement had been to write into another database, then we might have a cogent answer. I've done this, though only for 823 tables.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

That's pretty straightforward. Parameterise the table name and use the same parameter in the text file name. Use RPC throughout (you effectively get select * from table happening).

Loop through a list of table names obtained from the database's system tables to get the names. Maybe create a simple (server?) job to write these into a file that your sequence can read. A server job can put this list into its own user status area, obviating the need for a file.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
bicap
Premium Member
Premium Member
Posts: 95
Joined: Mon May 03, 2010 10:22 pm
Location: India
Contact:

Post by bicap »

Ray, Thank you so much for helping me on this. My solution is working.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

RCP doesn't (can't) perform metadata checking.
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