Data truncation is happening

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
deepa_shenoy
Participant
Posts: 95
Joined: Thu Sep 24, 2009 12:15 am
Location: India

Data truncation is happening

Post by deepa_shenoy »

Hi,

I am unable to view data from the DB2 source stage. It is throwing the below error.

DB2_COLR: The size specified for column 'COLR_N' (16) is less than that of the source table column (50);data truncation may result.
DB2_COLR: The size specified for column 'CRTE_TS' (16) is less than that of the source table column (26);data truncation may result.
DB2_COLR: SQLExecDirect: DB2 error info message '[IBM][CLI Driver] CLI0113E SQLSTATE 22007: An invalid datetime format was detected; that is, an invalid string representation or value was specified. SQLSTATE=22007'.
DSTAGE-DB2CLI-0026`:`SQLFetch: Error retrieving results from server.

The data type in the source, and the metadata given in the DB2 stage are exactly the same. What could be the issue?
-D
premupdate
Participant
Posts: 47
Joined: Thu Oct 04, 2007 3:37 am
Location: chennai

Post by premupdate »

Hi,

Enable the environmental variable OSH_PRINT_SCHEMA and compare the metadata.
Cheers,
prem
deepa_shenoy
Participant
Posts: 95
Joined: Thu Sep 24, 2009 12:15 am
Location: India

Post by deepa_shenoy »

No that did not help.

Although, if you arrange the columns in the Custom SQL same as the order in the Metadata, that works!!

A silly solution, but a solution nonetheless :)
-D
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Silly solution? More like an absolute requirement.
-craig

"You can never have too many knives" -- Logan Nine Fingers
deepa_shenoy
Participant
Posts: 95
Joined: Thu Sep 24, 2009 12:15 am
Location: India

Post by deepa_shenoy »

Is it? Oh my mistake then. I did not know that.

In DS 8 there was no such requirement. Still getting used to DS 8.5.
-D
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Always been a requirement, as far as I recall. [shrug]
-craig

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