OCI has fetched truncated data

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
pradkumar
Charter Member
Charter Member
Posts: 393
Joined: Wed Oct 18, 2006 1:09 pm

OCI has fetched truncated data

Post by pradkumar »

I am trying to extract a large volume of data.
When I run the job for 1000 records, it is running fine.
But when I run it for more than 1000 it is running but with a warning " OCI has fetched truncated data"

I encountered this error before when I was loading the data year wise. I thought, "since I was loading only one year data from a large pool of data it is giving me such a warning and I ignored it"

Any Comments on this plz?
Pradeep Kumar
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Search the forum, causes for this have been covered a number of times.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Your metadata is wrong. Re-import the metadata and use that. If the messages continue, then you have to figure out which columns don't match the data. Sometimes metadata shows no decimal scale, but the actual data contains decimals. You'll have to set the decimal scale manually in the job to give you the correct answers.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
pradkumar
Charter Member
Charter Member
Posts: 393
Joined: Wed Oct 18, 2006 1:09 pm

Post by pradkumar »

I figured out that there are four amount columns in my job which are cuasing this error.
Acc_DR -->1000, 2987.76
Acc_CR---->291.13, Null(just empty space)
Entered_DR-->234.09,23
Entered_CR-->459.09,-900.20

and all the above four are numeric data type with length of 38 in the SOURCE and TARGET.
I manually changed scale to 2 in the target, but it was no use..

Any ideas over this issue ?
Pradeep Kumar
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Your error messaage is on the SQL selecting the data out of the source. The metadata says NUMERIC 38 so when DS binds to the Oracle client, any decimal values have to be truncated.

Change the metadata in the OCI stage selecting from Oracle. Twiddling the scale will fix your warning message, plus give you data with decimals. This is a problem where data modelers create tables using loose datatyping.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
pradkumar
Charter Member
Charter Member
Posts: 393
Joined: Wed Oct 18, 2006 1:09 pm

Post by pradkumar »

I changed the data type to Decimal in source. But still warnings are comingI am using a scale of 1.
Shall I use scale in my source and all other transformer stages following it or is it just enough if I change in source (OCI stage).

Is there any range of scale values I have to use or its simply trial and error.
Pradeep Kumar
pradkumar
Charter Member
Charter Member
Posts: 393
Joined: Wed Oct 18, 2006 1:09 pm

Post by pradkumar »

I solved the above problem by using Trunc(Columnname,2) in the source itself.

But now I am facing a DS Phantom error when I am trying to do the following:

1) I am trying to calculate the balance amount as:

Code: Select all

ICONV(ACCOUNT_DR,"MD2")-->STAGE VARAIBLE 1
ICONV(ACCOUT_CR,"MD2")-->STAGE VARIABLE 2

OCONV(STAGE VARIABLE1- STAGE VARIABLE2, "MD2")
I am getting the following phantom error:
Phantom 9673
Program "JOB.811108259.DT.1424949098.TRANS2": Line 300, Improper data type.
Pradeep Kumar
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

You don't need to ICONV numerics to subtract. Just subtract them. To format and round, just use OCONV(value, "MDXY") where X is the decimal scale to round and Y is the shift for implied decimals.

Improper datatype means a NULL was used in a math expression.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
pradkumar
Charter Member
Charter Member
Posts: 393
Joined: Wed Oct 18, 2006 1:09 pm

Post by pradkumar »

Thanks a lot..

There were few null values,
I used in source itself NVL now and now its working fine without Iconv and Oconv
Pradeep Kumar
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Great. Thanks for sharing that with us. Now you can mark the post resolved. Others should make it a habbit to mark their posts resolved for ease of search.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply