🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

"write db operator"

User: "lghansse"
New Altair Community Member
Updated by Jocelyn
Hi, 

I'm currently using the the write database operator (with overwrite mode: overwrite first, append then)  as part of a process. When The database is being written I get an error 'Database error occurred: (conn:13694) Duplicate entry '128230' for key 'PRIMARY''. I checked the column specifics and indeed, one of the columns is added as a primary key (see also below). However, I've never defined this attribute as a key (and it shouldn't be). Does anybody know how to prevent the writing operator to see and write this as a key? 




Find more posts tagged with

Sort by:
1 - 3 of 31
    User: "Edin_Klapic"
    New Altair Community Member
    Accepted Answer
    Hi @lghansse ,

    The column contact_id in your ExampleSet probably has the RapidMiner Role id. This is seen as marker to set this column as key.
    Solution:
    Use Set Role to change the Role of this column either to something different. You can even create a Role of your choice.
    But remember: Each Role can only occur once in an ExampleSet.

    Happy Mining,
    Edin
    User: "lghansse"
    New Altair Community Member
    OP
    @Edin_Klapic, thank you! Should have thought about that myself  :#
    User: "M_Martin"
    New Altair Community Member
    I can confirm Edin's comment above - I ran into the same problem, and using Set Role was the answer.  If you ultimately want a column in your destination table to have a column to ensure row uniqueness, you could use the Execute SQL operator to append data just loaded with your Write Database operator to another table in your database that also includes an Identity type column that would populate (i.e. auto-number) as data is appended.  Best wishes, Michael Martin