I have designed a VDP job in schdeuler.
I have two three columns in the MSSQL table and all three of them are part of primary column.
In the exporter section of scheduler job I have set the config as below
Delete table contents to false
update tuple if exists to true
When I execute the job, it is throwing error as below.
com.denodo.scheduler.core.exporter.jdbc.JDBCExporter [job_name] - SQLState: S1000
49974031
ERROR 2019-11-22T00:32:58.713 com.denodo.scheduler.core.exporter.jdbc.JDBCExporter [[job_name.pool-4-thread-7]] - Error updating document: {LSL_OBJECT_ID=0bd4e4ab-394e-4291-adc4-ff6eed1dee9f, LSL_TITLE=Task Specific, CULTURE_ID=20, _$DOC_ID=403140}
java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK_pkname'. Cannot insert duplicate key in object 'dbo.table_name'. The duplicate key value is (0bd4e4ab-394e-4291-adc4-ff6eed1dee9f, Task Specific, 20).
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372) ~[jtds.jar:1.3.1]
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988) ~[jtds.jar:1.3.1]
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421) ~[jtds.jar:1.3.1]
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:671) ~[jtds.jar:1.3.1]
at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:613) ~[jtds.jar:1.3.1]
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:572) ~[jtds.jar:1.3.1]
at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:727) ~[jtds.jar:1.3.1]
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105) ~[commons-dbcp.jar:1.4]
at com.denodo.scheduler.core.exporter.jdbc.JDBCExporter.toJDBC(Unknown Source) ~[denodo-scheduler-core.jar:7.0.4]
at com.denodo.scheduler.core.exporter.jdbc.JDBCExporter.normalExport(Unknown Source) [denodo-scheduler-core.jar:7.0.4]
at com.denodo.scheduler.core.exporter.jdbc.JDBCExporter.export(Unknown Source) [denodo-scheduler-core.jar:7.0.4]
at com.denodo.scheduler.core.job.ExportationJob.exportDocuments(Unknown Source) [denodo-scheduler-core.jar:7.0.4]
at com.denodo.scheduler.core.job.ExportationJob.doFlushQueuedDocuments(Unknown Source) [denodo-scheduler-core.jar:7.0.4]
at com.denodo.scheduler.core.job.AbstractDatabaseExtractionJob.flushQueuedDocuments(Unknown Source) [denodo-scheduler-core.jar:7.0.4]
As per the configuration and understanding, tuple should get updated when there is a duplicate records.
Another observation is other tables where all columns are not part of primary key, they are getting updated. Please advise how to fix this issue