The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

Write database error - unique constraint vs batch mode

rademaradema Member Posts: 10 Contributor II
Hi,

I'm getting some error with a Write Database operator. I usually write data using append mode in a table in an Oracle Database which as a unique constraint on some attributes. The connection with the database is not direct but I rather connect to a Denodo "database" which automatically push the data to the original database. 

I've observed that if I write data in Append bond with a batch value smaller than the table size I get the following error:
There was an error during a batch insertion: ORA-00001: unique constraint (<constraint_name>) violated

On the other hand, if I set the batch to 0 the operation is rather slow. Have you never faced something similar? It is not clear if the problem is related to some back-end operator of the Write Database operator or if it is due to Denodo connection.

Thanks

R

Best Answer

  • BalazsBaranyBalazsBarany Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn
    Solution Accepted
    Hi,

    the batch size means that the given number of operations is grouped together in a transaction. This can be a huge performance benefit.

    I haven't seen the problem you're describing. You could try batch sizes like 1, 2, 5, 10 and see if the error still happens.

    The additional database layer can of course cause problems like this. 

    Regards,
    Balázs
Sign In or Register to comment.