Page 1 of 1

Can i enable RCP in DB2 API Stage

Posted: Mon Aug 21, 2006 7:40 am
by satishmelinamani
Hi,

Is there any way that i can enable Runtime Column Propogation(RCP) in DB2 API Stage. My requirement is to have a generic job which can extract data from DB2 database without actually defining the column metadata.

Thanks,
Satish

Posted: Thu Nov 02, 2006 7:16 pm
by Daddy Doma
I'm trying to test this same issue right now, and I suspect the answer is no. It works fine using the EE stage, but returns the following error when running use API:

Code: Select all

Fatal Error: Fatal: This SQL statement did not contain the same number of parameters as columns on this link.  This usually happens with user-defined SQL.

Posted: Thu Nov 02, 2006 7:41 pm
by ray.wurlod
Theoretically the answer is yes. With RCP enabled, the default behaviour of Read mode is the same as SELECT * FROM tablename; - that is, all columns are selected. In practice this can result in far more data having to be transferred from the database server to DataStage than is really warranted.

Posted: Thu Nov 02, 2006 7:55 pm
by Daddy Doma
I agree with your comments about RCP, Ray. In practice we are trying to limit it's application to jobs where the same processes need to be ran over and over and over again (i.e. thousands of files to be processed and loaded to a database).

The error I described above occurs when trying to load a database table via the API stage. Our situation is:

- We have numerous sequential files of different formats, that are constantly changing.
- We want to do a simple one-to-one load from file into a database table.
- Ideally, we would like to drop the table, create a new one using the RCP, and load.

Now, the API stage drops the table correctly, but does not pass the RCP to the Create Table DDL. We decided to compromise by manually changing the tables whenever the input file is different, but the API stage still does not allow us to insert records using RCP.

This all works when using the EE stage, but our database admin/security team does not want to set up the target database to support this.

Posted: Mon Nov 06, 2006 11:47 pm
by tagnihotri
I have tried otherway round i.e. to load data using dataset and seq files and it works fine for me!!

Do remmember you have to make sure the target if not the source should be able to pick up the metadata and then it should work fine.

ray.wurlod wrote:Theoretically the answer is yes. With RCP enabled, the default behaviour of Read mode is the same as SELECT * FROM tablename; - that is, all columns are selected. In practice this can result in far ...