Page 1 of 1

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

Posted: Wed Apr 20, 2011 11:31 pm
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?

Posted: Wed Apr 20, 2011 11:57 pm
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,

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

Posted: Thu Apr 21, 2011 2:58 am
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.

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

Posted: Thu Apr 21, 2011 7:35 am
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