Page 1 of 1

Truncation of Data

Posted: Tue Jan 30, 2007 4:41 pm
by samu
Hi,

I have a simple job of copying data one table in one Database to another table in other database. But when I trying to copy the data using Parallel Extender job it is truncating the last digit in the column even though the Column is defined as varchar. I had tried increasing the length of the column and also trim but it didn't work . So I had done a Server job of the same data dump and it is working fine. So can some one explain to me why the data is being truncated by the PX job. I am using DRS stage to dump the data since the respective databases are sitting on MSSQL servers.

The column in question has data as 1000, Z123 etc.,

Thanks.

Posted: Tue Jan 30, 2007 5:19 pm
by splayer
DS 7.5.1A SQL Server drivers does not support SQL Server 2005. For that, you need to ask IBM for DataDirect5.2 drivers which will allow you to write to a SQL Server 2005 database.

For a temporary solution, you need to add a transformer right before the load using the DRS stage. Then, for every varchar column, in the Derivation, add a space. So if your column was called Address, you do:

Address: " "

In the output column of the transformer, increase the width by 1 so the input column coming to the DRS stage will be increased by 1 automatically. This will take care of the problem.

Re: Truncation of Data

Posted: Tue Jan 30, 2007 5:22 pm
by us1aslam1us
samu wrote:Hi,
The column in question has data as 1000, Z123 etc.,
Thanks.
What is the data-type and length for this field in source? How are you cinfirming that the ' last digit' is missing through 'view data' or by query on target table. When you load is working fine with server job, it will work with parallel too unless you are not designing your PX job properly.

Re: Truncation of Data

Posted: Tue Jan 30, 2007 6:00 pm
by samu
us1aslam1us wrote:
samu wrote:Hi,
The column in question has data as 1000, Z123 etc.,
Thanks.
What is the data-type and length for this field in source? How are you cinfirming that the ' last digit' is missing through 'view data' or by query on target table. When you load is working fine with server job, it will work with parallel too unless you are not designing your PX job properly.
As I had said the job is simple it has DRSstage (MSSQL server 2000) -- Transformer --- DRSstage (MSSQL server 2005). the length of the column is the same in both the databases. the job is designed the same way for both parallel and server jobs. So is there any mistake in the design of the job :roll:.The data is queried on the target table in the target database.