Hello,
tonight we got a very strange error. DataFlow tried to insert NULL-s into certain NOT NULL COLUMN.
All our query values are surrounded with NVL(Query.fieldName, -1) function.
This certain column gets its value from database function (eg. DS_LIVE.BO.FIND_ASSOCIATED_PERSON_ID(null, date1, date2)) Also the first parameter for our PL/SQL function is NULL with this certain row, but this shouldnt matter, because also this pl/sql function returns only nvl-ed values.
But still, it gives out NULL-s. What might be the cause of NVL to give out NULL-s?
I also mention that all our last query transforms before table targets are using NVL-s.
There is no outer join. The field from the previous query is surrounded with the NVL function and as stated in the techical manual: NVL replaces NULL values with specified values, but here it is not doing it, it still gives out NULL.
I replaced the original table with template table(template table is not pre-created, so I saw actual data types and values) and tried to run this flow again. The row with the NULL column appeared in the table.
I thought that the problem may be with different data types, but I changed them and no hope, so I added additional query transform between the last query transform and the target table and NVL-ed all fields once again.
The only other idea is empty strings and pushdowns.
The nvl(’’, NULL) might be pushed down and the database treats both different. So the result of this function is an empty string hence. In the target database there is no empty string semantic, these are converted to NULLs. Something along those lines…
Just in case I write here down the “path” of this field:
Query1:
DS_TARGET.BO.FIND_PERSON_ID (it is added as a function call and passed on as PERSON_ID decimal(28,7))
->Query2:
NVL(PERSON_ID,-1), passed on as person_id int
Converting from decimal(28,7)->int should not affect anything in my case?
there was a bug in 12.1, in which the function was returning the first argument that is passed as return value, what is the first argument datatype that you are passing to this function
try calling this function from a script and see what is the value its returning ?