Different results in debug and execution modes

A field ID from input has(24,11) precision. The decimal part is not needed, so I had changed it to (24,0) in a query transform and then mapped to a field with varchar2(10). Data in this field has less than 10 digits only.

When debugging the code, it properly leaves off the decimal points and loads into the varchar field. But when the same job is being executed
(not in debug mode) the decimal pionts are getting loaded.

Can anyone tell me why this inconsistent execution behaviour is seen.


superkents (BOB member since 2009-03-02)

there problem might come because during the execution . possibly DI is pushing down the operation to the DB and hence the precision conversion does not work properly,

but when you do it in the debug mode, the operation is not pushed down and hence DI will do the precision conversion and give you the expected result.

the work around may be creating a temporary table and then processing.


dragonwhiz :cn: (BOB member since 2009-09-25)

no pushdown is implemented. Anyways this has been solved by altering the field size in DB.
But all I need to know is the reason for mismatch in execution behaviour.


superkents (BOB member since 2009-03-02)

No pushdown might be implemented? Do you mean you did not code it? You understand that there is a dataflow optimizer which can rewrite your dataflow into a ful pushdown. Sometimes.
Next time open the dataflow and in the menu open the display-optimized-SQL to get a first idea on what is done during runtime.


Werner Daehn :de: (BOB member since 2004-12-17)

yes wdaehn, the optimizer just takes the data directly from source and skips the conversions.
But isnt that odd.

Anyways I coded in a pushdown so that the conversion cant be skipped.


superkents (BOB member since 2009-03-02)

hello yes we have the same problems with truncating…seems to be a bug in BODI.

I think this bug is caused when I use IFTHENELSE() inside of a query (attribute mapping)

when I have a ifthenelse clause with a double attribute inside of ifthenelse clause and a decimal28,7variable in the condition, then BODI truncates also the values inside of the ifthenelse-clause.

ifthenelse(decimal28,7-variable, double, double)


boximaster (BOB member since 2008-05-26)

ifthenelse returns the datatype of the THEN part.

Example

ifthenelse(1=2, 1, 99.99)

will return 99 always as the return datatype is specified to be an int. This version works correctly and will return 99.99:

ifthenelse(1=2, 1.00, 99.99)


Werner Daehn :de: (BOB member since 2004-12-17)