Page 1 of 1

Oracle connector stage not rejecting data truncations errors

Posted: Fri May 11, 2018 12:44 am
by Lavanya B
Hi,

I am loading data to oracle database using Oracle connector stage as my target.
The source column is varchar 20 and target oracle column is varchar2(10).
I have put a reject link from the target oracle connector stage and have checked the data truncation errors check box in the reject link. But the source records that have data greater than 10 characters are also getting loaded into the target table when actually they need to be rejected. I am using Insert mode to load the records.
Below is the job design
File->Transformer--------->OracleConnector-->RejectLinktoFile

Is any configuration missing in the oracle connector stage or is any environment variable needs to be set?

Posted: Fri May 11, 2018 6:33 am
by chulett
Not that I am aware of, that should be all it takes as far as I know. I'd check with support, may be a known issue in your version with a patch available.

Posted: Fri May 11, 2018 10:10 pm
by ray.wurlod
Can you try an INSERT statement with more than ten characters into this field using some other client, such as TOAD or Data Studio? If Oracle will accept (and, presumably, truncate) over-length strings, then DataStage cannot detect in the Oracle Connector that this problem has occurred.

You may be able to raise the level of error reporting in Oracle.

Otherwise, you could reject these rows in your Transformer stage.

Posted: Sun May 13, 2018 8:25 pm
by Lavanya B
I have tried inserting into Oracle table using TOAD, but I get an error saying that the number of characters exceeding the length.
But I am surprised why am I not getting this error while running the job in DataStage.

Posted: Mon May 14, 2018 11:16 am
by vmcburney
I assume DataStage is truncating the data before it sends it to Oracle and thus avoiding the error. Do you see any truncate warning messages in the DataStage job log?

Posted: Tue May 15, 2018 5:50 am
by Lavanya B
When I increase the length of the field ()i.e varchar 15) in the Input tab of Oracle connector, then the record gets rejected from Oracle connector stage.

Yes even I think DataStage is truncating the data before sending it to Oracle but I dont see any warning messages in the log.

Is there any patch/environment variable setting to supress this truncation?

Posted: Mon May 21, 2018 10:31 pm
by Lavanya B
Hi,

Any patch/environment variable setting is available to suppress the truncation of data?
Please provide suggestions.