Page 1 of 1

Column data truncated

Posted: Mon Jul 17, 2006 8:28 am
by meena
Hi All,
Good Morning,
I am getting this warning :

Code: Select all

Pyhth..Map_re_grt: The column data has been truncated to 'R'.
Pyhth..Map_re_grt: The column data has been truncated to 'S'.

Actually I am invloved in redesinging of this job. I am not sure for what reason I am getting this warning.

Thanks in advance

Posted: Mon Jul 17, 2006 8:33 am
by chulett
Typically because you've defined your metadata as having a size of 1.

Re: Column data truncated

Posted: Mon Jul 17, 2006 11:23 am
by rwierdsm
Hi Meena,

Typically, DataStage doesn't care about the data contents until you try to insert into a Database table or some other place where data is strongly 'typed'. Usually I get this error when I've been carrying data that is defined with greater length than the target database.

Check the metadata for your target table column (or whatever is hosting your target data) and ensure it lines up with the metadata in the DS stage that is passing the data to the target.

Hope this helps,

Rob

Posted: Mon Jul 17, 2006 11:43 am
by chulett
You are correct in that it is 'enforced' when transferring to a passive stage like an RDBMS stage.

In my experience, the warnings noted in the original post are generated by DataStage because the size declared in the job is smaller than the actual data. DataStage then truncates the data so as to not upset the database.

If the field size is smaller in the actual target field than declared in the job, you would see the data actually being rejected and an rdbms error generated. Now, granted, all this is from working with Oracle... perhaps other databases truncate oversized data - Oracle rejects it.

Posted: Mon Jul 17, 2006 12:18 pm
by meena
Thank you..
I came out of the warnings. It was the problem with length of metadata.