In my job we are capturing changes in the Current file against an Empty file. Here all the records are new records and i am populating these records to Oracle Table.All the records are inserted into Oracle table.
Now,We are using a new current file against the Empty file to captures the changes.Logically,all the records are new records here.But Oracle Stage rejects all the records here with Ora-1400 code.
I handled nullable columns in a Transformer stage to populate to non nullable Oracle Columns.
I used below Column derivation for map a nullable column(ie;Column_A) to a Non_Nullable column:
If IsNotNull(Column_A) Then Trim(Column_A) Else NullToEmpty(Column_A).
But my issue is:
Why all the records are inserted for one current file and all the records are rejected for a new current file?
While DataStage understands the difference between 'null' and 'empty', Oracle treats them as identical so you're not actually handling them like you think you are.
-craig
"You can never have too many knives" -- Logan Nine Fingers
So, rather than NullToEmpty you'll need to convert null values for required fields to whatever value is appropriate. Spaces? 12/31/9999? Depends on the data type and the rules in your target.
-craig
"You can never have too many knives" -- Logan Nine Fingers