Warnings on Decimal-to-Decimal moves

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
kdthomas
Premium Member
Premium Member
Posts: 5
Joined: Tue Oct 09, 2007 11:05 am

Warnings on Decimal-to-Decimal moves

Post by kdthomas »

Hi all,

I'm puzzled by the following scenario:

The job structure is as follows:

SeqFile---------->Transformer---------->Teradata MultiLoad

One of the columns in the SeqFile is defined as DECIMAL(7,7) NULL. In the Transformer, I transfer it unchanged to a DECIMAL(7,7) NULL column.

The target Teradata column is also defined as DECIMAL(7,7) NULL.

I'm loading about 130,000 rows. During the load, I get warnings in the Teradata MultiLoad stage for 17 rows. An example:

mld_FAC_curmth_equip_gl_jrnl,0: Warning: At row 18320, link "Lnk_to_mload", while processing column "PRORTE_PCT"
Value treated as NULL
Attempt to convert String value " ." to Decimal type unsuccessful

I trapped the offending column in all 17 rows...the pattern is that the first significant digit is > 0 followed by all zeroes:

" .3000000"
" .7000000"
" .3000000"
" .7000000"
" .3000000"
" .7000000"
" .3000000"
" .7000000"
" .3000000"
" .7000000"
" .1000000"
" .1000000"
" .1000000"
" .1000000"
" .7000000"
" .3000000"
" .1000000"
" .1000000"

When I look at the trapped records in hex (command od -bc), the first column is a space (40) and all other columns have valid values. In sampling the other rows in the file which load successfully, all appear to have a leading space as well.

Two questions:

1. Why do I get a "String" value message when the source is Decimal?
2. Any idea how I can fix this?

Appreciate any thoughts anyone might have...thanks much.
kdthomas
Premium Member
Premium Member
Posts: 5
Joined: Tue Oct 09, 2007 11:05 am

Post by kdthomas »

I was able to find a workaround:

1. Change target column in Transformer to CHAR(9)
2. Add the derivation "DecimalToString(Lnk_read_from_source.FO_PRO_PCT)"
3. Let the Teradata database do the implicit conversion from CHAR(9) to DECIMAL(7,7)

Job runs perfectly now. I will mark this thread accordingly.

Happy New Year everyone.
Post Reply