Page 1 of 1

Posted: Mon Jun 04, 2012 6:35 pm
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.

Posted: Mon Jun 04, 2012 9:05 pm
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.

Posted: Tue Jun 05, 2012 12:50 pm
by bicap
Ray, Thank you so much for helping me on this. My solution is working.

Posted: Tue Jun 05, 2012 10:48 pm
by ray.wurlod
RCP doesn't (can't) perform metadata checking.