Data Truncation in ODBC Enterprise 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
ds_infy
Premium Member
Premium Member
Posts: 59
Joined: Tue Jun 09, 2009 4:17 am
Location: India

Data Truncation in ODBC Enterprise stage.

Post by ds_infy »

Hi All,

I have a job, which extract data from MSSQL database server using ODBC enterprise stage. In the extract query I have field called NAME which is varchar (50) in the table and in the job I have defined it as varchar without any length. Now the issue is the data in this column is getting truncated. I am able to view only the first 26 character of the actual data.

Can anyone provide any pointers/inputs will be really helpful? Is there any environment setting that needs to be modified to resolve this issue?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Do you have any good reason for using unbounded VarChar? If not, use VarChar(50) and you will guarantee sufficient storage for all characers in the string.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ds_infy
Premium Member
Premium Member
Posts: 59
Joined: Tue Jun 09, 2009 4:17 am
Location: India

Post by ds_infy »

ray.wurlod wrote:Do you have any good reason for using unbounded VarChar? If not, use VarChar(50) and you will guarantee sufficient storage for all characers in the string.
I have tried with VarChar(50) option. But still issue is same.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Then you're going to have to find out where the truncation is occurring. For example, is there a SUBSTRINGS function in the extraction SQL? Is there some point in the job where the field is a VarChar(26)? DataStage will NOT exhibit this behaviour unless it is programmed to do so.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ds_infy
Premium Member
Premium Member
Posts: 59
Joined: Tue Jun 09, 2009 4:17 am
Location: India

Post by ds_infy »

ray.wurlod wrote:Then you're going to have to find out where the truncation is occurring. For example, is there a SUBSTRINGS function in the extraction SQL? Is there some point in the job where the field is a VarChar(26)? DataStage will NOT exhibit this behaviour unless it is programmed to do so.
Hi There is no substring function used in this SQl. It is a direct extract of that name column from the table. I have verified that job, nowhere its varchar(26). I am getting this truncated data even if i try to view data directly from the ODBC enterprise stage.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Is your "varchar(50)" in SQLServer 50 bytes or 50 characters? You may have a 'byte semantics' issue with a multi-byte character set. What is/are the charactersets involved here?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply