Hi All,
I am repartitioning the data based on the columns Say A,B,C and sorting the incoming data on the columns A,B,C by using the sort stage. Then I am upserting the dat into the table XXX in the table which is in the Oracle DB. I am using the Upsert Mode to load the data into the table and the upsert options i have used is "Update Then Insert".The keys used for teh update is A,B,C.
The target table(Staging Table) will be empty.According to my knowledge if we use "Update then Insert", if the records are not found or if the target table is empty to update then it should be inserted into the table.
But the records are getting rejected and i am getting the SQL code as -1.I know the SQL code -1 is for unique key constraint violation, but there are no Duplicates in the Keys.
PLease Help.
Data Upsert in Oracle DB
Moderators: chulett, rschirm, roy
Put a remove duplicates stage(and declare the keys) in between your sort stage and the Oracle stage and then run the job and see if it still gives the same error.
Also, in your target OCI stage, did you declare all your three columns as keys? Just double check.
HTH
Also, in your target OCI stage, did you declare all your three columns as keys? Just double check.
HTH
Kris
Where's the "Any" key?-Homer Simpson
Where's the "Any" key?-Homer Simpson
-
- Participant
- Posts: 48
- Joined: Wed Jun 01, 2005 7:10 am
As i manetioned in my question, there are no duplicates coming in for the keys A,B,C.
I have checked my target Oracle stage,i have declared these three fields as keys.
Actually i am sorting on the 5 fields say A,B,C,D,E and while updating into the Oracle DB i am using only three key fields thais A,B,C. Is this causing an issue.![Sad :(](./images/smilies/icon_sad.gif)
I have checked my target Oracle stage,i have declared these three fields as keys.
Actually i am sorting on the 5 fields say A,B,C,D,E and while updating into the Oracle DB i am using only three key fields thais A,B,C. Is this causing an issue.
![Sad :(](./images/smilies/icon_sad.gif)
-
- Participant
- Posts: 48
- Joined: Wed Jun 01, 2005 7:10 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 48
- Joined: Wed Jun 01, 2005 7:10 am