Cannot store data in repository at entry.... Violation of primary key constraint
When I try to store a dataset on a remote server, I get the following error message. It seems that it is trying to add the attribute names into a metadata table that already contains them. How do I clear these metadata tables out?
Best Answer
-
Edin_Klapic Employee, RMResearcher, Member Posts: 299 RM Data Scientist
Hi ccricha,
the Primary key in the Meta data tables contains the Attribute names which need to be unique in RapidMiner (and they definitely are in your RapidMiner object you want to store).
Nevertheless I suppose there are characters in these names which may not be correctly interpreted by your database.
Just for testing purposes, could you please try and use the Operator Rename by Generic Names to rename all attributes.
The resulting ExampleSet should look like 'att_1', 'att_2',....
Best,
Edin
2
Answers
You could try a Materialize Data right before you write it to the database BUT i'm not sure that's going to work 100%.
Hello,
Is it possible to attach the more verbose error from inside the log view for that process? You should be able to access it from clicking the log icon next to the completion times in your process scheduler.
This fuller log segment will give us an idea of the specific error
Sure, here is the full error from the log file.
It turns out that there were two attributes that contained the same name and it makes sense that these were causing a violation of the primary key constraint in the database. I have removed some unnecessary columns and it now works.