Can we use schema file, if Source stage is a DB2 EE stage?

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
Nageshsunkoji
Participant
Posts: 222
Joined: Tue Aug 30, 2005 2:07 am
Location: pune
Contact:

Can we use schema file, if Source stage is a DB2 EE stage?

Post by Nageshsunkoji »

Hi Folks,

I know that, we can use the schema file if Sequential file is a source. I have a requirement, my source is DB2EE and Target is Sequential file. I have to extract full data from the source tables and needs to load in the file. I have around 100 tables with the same requirement. Instead of creating 100 jobs for 100 tables, I am thinking of using SCHEMA file concept here and create only one generic job parameterise the table name, extract will be simple SELECT * FROM #TABLENAME# and table definition will be sourced from schema file.

My question to DS guru's is, first of all is it possible to do so in DS V 8.5? if not, what will be the alternate approach for the same?
NageshSunkoji

If you know anything SHARE it.............
If you Don't know anything LEARN it...............
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

The database stages do not support the use of a schema file at runtime. You can, however, supply a schema file to the Sequential File output stage of your job. You will need to enable Runtime Column propagation for the stages in the job.

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
blewip
Participant
Posts: 81
Joined: Wed Nov 10, 2004 10:55 am
Location: London

Re: Can we use schema file, if Source stage is a DB2 EE stag

Post by blewip »

I think what you want to do will be fine.

Just select * from tablename and use RCP.

The database doesn't need a schema file. The sequential file doesn't require a schema file.
Modern Life is Rubbish - Blur
synsog
Premium Member
Premium Member
Posts: 232
Joined: Sun Aug 01, 2010 11:01 pm
Location: Pune

Re: Can we use schema file, if Source stage is a DB2 EE stag

Post by synsog »

You can do that by making just one generalized job parameterizing table name as well as the filename.
Eg:

Source:SELECT * FROM #TABLENAME#
Tgt:#TABLENAME#_Timestamp.csv
Post Reply