Hi,
I want to load some data into a Oracle table using oracle connector (in append mode). My job fails if there's some issue with the data load (like primary key violation, NULL value for not-NULL fields etc).
I want the job to continue and insert whatever it can and reject records which can't be inserted to a reject file.
Is this feasible in Datastage.
P.S. I found one logging property in Oracle connector. But that says 'Log column values on first row error'. Does this mean only the first row which encountered insert error will be logged, other rows can't be logged. If 10 out of 100 rows are rejected, will only 1st row be logged, not other 9 rows?
Reject file for Oracle connector in write method
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 38
- Joined: Tue Jun 19, 2012 11:03 pm
- Location: India
-
- Premium Member
- Posts: 38
- Joined: Tue Jun 19, 2012 11:03 pm
- Location: India
-
- Premium Member
- Posts: 38
- Joined: Tue Jun 19, 2012 11:03 pm
- Location: India
These quoted suggestions are from the product documentation / online help:
and... if you define a reject link but a failed record does not match any of the specified reject conditions, the connector reports an error and stops the job
...
4. Double-click the connector to open the stage editor.
5. On the Output page, select the link to the target stage for rejected records from the Output name list.
6. Click the Reject tab.
7. From the Reject rows based on selected conditions list, select one or more conditions to use to reject records.
8. Use one of the methods in the following table to specify when to stop a job because of too many rejected rows.
...
9. Optional: From the Add to reject row list, select ERRORCODE, ERRORMESSAGE, or both. When a record fails, the rejected record includes the Oracle error code and the corresponding message that describes the failure. For a complete list of the Oracle error codes and messages, see the Oracle documentation.
Choose a job you love, and you will never have to work a day in your life. - Confucius