Integrity constraint
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 76
- Joined: Wed Jan 25, 2006 6:42 pm
Integrity constraint
Hi,
i am getting the following error, the records are not loaded into the target, and giving warning messages.
ORA-02291: integrity constraint (schema name.CONTACT_PERS_FK) violated - parent key not found
DBMS.CODE=ORA-02291
Please help me.
Thanks in advance.
i am getting the following error, the records are not loaded into the target, and giving warning messages.
ORA-02291: integrity constraint (schema name.CONTACT_PERS_FK) violated - parent key not found
DBMS.CODE=ORA-02291
Please help me.
Thanks in advance.
ETL
You will find more on this in the forum. Your Parent table is missing some key vlaues and you may have to investigate why they are missing in there.
viewtopic.php?t=93704&highlight=parent+key+not+found
viewtopic.php?t=93704&highlight=parent+key+not+found
-
- Participant
- Posts: 76
- Joined: Wed Jan 25, 2006 6:42 pm
It either means that you are doing something wrong in the job or the data in the table is incorrect.vardhan354 wrote: i loaded the parent job first, Again i am getting the same error,
Can you explain this in detail?vardhan354 wrote: can i use lookup with that table with this job and load the data,
which option is better:-
drop the constraint (or) using lookup with the table.
on the same column.
Kris
Where's the "Any" key?-Homer Simpson
Where's the "Any" key?-Homer Simpson
-
- Participant
- Posts: 76
- Joined: Wed Jan 25, 2006 6:42 pm
I mean supose there are two tables.
table A, table B
table A --- parent table
i already loaded the data into tableA.
now when i am trying to load the data into tableB, it is giving integrity constraint error.
My opinion if lookup with parent table (table A) and table B on column which we are getting integrity constraint (key violation).
is this work.
table A, table B
table A --- parent table
i already loaded the data into tableA.
now when i am trying to load the data into tableB, it is giving integrity constraint error.
My opinion if lookup with parent table (table A) and table B on column which we are getting integrity constraint (key violation).
is this work.
ETL
-
- Participant
- Posts: 76
- Joined: Wed Jan 25, 2006 6:42 pm
Well, with the lack of info about your business, i cannot tell you that, thats for you to investigate. Code columns usually end with _CD. See if you have any such column that you are loading.
I am not saying that this is the problem, it might be. Chances are more of you missing a record load in the parent table and loading it in the child table.
Have a reject link coming out of your transformer with the constraint as
LoadLink.REJECTED where LoadLink is the name of the link thats going into your database. This way you will capture all such records which are rejected. Investigate those values in the parent table and see why are they not getting loaded in the parent table.
I am not saying that this is the problem, it might be. Chances are more of you missing a record load in the parent table and loading it in the child table.
Have a reject link coming out of your transformer with the constraint as
LoadLink.REJECTED where LoadLink is the name of the link thats going into your database. This way you will capture all such records which are rejected. Investigate those values in the parent table and see why are they not getting loaded in the parent table.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
-
- Participant
- Posts: 76
- Joined: Wed Jan 25, 2006 6:42 pm
Yes, when a row will be rejected, you will get warning messages. Now you have to look into those rejected rows and investigate why the FK column value is not present in the parent table. This will give you a good starting point for your investigations.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.