嗨,大家好,我是pentaho
新手,使用pentaho kettle version 7.1
和mysql jdbc driver
版本是5.1.43。我在不同的数据库中有两个相同的表。我们叫db1
是第一个在生产中托管的数据库,而db2
是另一个在开发中托管的数据库。 db1
和db2
都有相同的表,称为dashboard_user
。表dashboard_user
有主键id
这是autoincrement
。但问题是,当我试图从生产,而不删除现有的数据在发展中复制值来发展它返回象下面这样:Pentaho错误:非主键重复条目
017/08/16 15:13:02 - Table output.0 - Connected to database [localhost] (commit=1000) 2017/08/16 15:13:02 - Table output.0 - ERROR (version 7.1.0.0-12, build 1 from 2017-05-16 17.18.02 by buildguy) : Because of an error, this step can't continue: 2017/08/16 15:13:02 - Table output.0 - ERROR (version 7.1.0.0-12, build 1 from 2017-05-16 17.18.02 by buildguy) : org.pentaho.di.core.exception.KettleException: 2017/08/16 15:13:02 - Table output.0 - Error inserting row into table [dashboard_domains] with values: [sonar.id], [2016/07/17 07:27:31.000000000], [2017/07/25 08:08:26.000000000] 2017/08/16 15:13:02 - Table output.0 - 2017/08/16 15:13:02 - Table output.0 - Error inserting/updating row 2017/08/16 15:13:02 - Table output.0 - Duplicate entry 'sonar.id' for key 'index_dashboard_domains_on_domain' 2017/08/16 15:13:02 - Table output.0 - 2017/08/16 15:13:02 - Table output.0 - 2017/08/16 15:13:02 - Table output.0 - at org.pentaho.di.trans.steps.tableoutput.TableOutput.writeToTable(TableOutput.java:385) 2017/08/16 15:13:02 - Table output.0 - at org.pentaho.di.trans.steps.tableoutput.TableOutput.processRow(TableOutput.java:125) 2017/08/16 15:13:02 - Table output.0 - at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62) 2017/08/16 15:13:02 - Table output.0 - at java.lang.Thread.run(Thread.java:748) 2017/08/16 15:13:02 - Table output.0 - Caused by: org.pentaho.di.core.exception.KettleDatabaseException: 2017/08/16 15:13:02 - Table output.0 - Error inserting/updating row 2017/08/16 15:13:02 - Table output.0 - Duplicate entry 'sonar.id' for key 'index_dashboard_domains_on_domain' 2017/08/16 15:13:02 - Table output.0 - 2017/08/16 15:13:02 - Table output.0 - at org.pentaho.di.core.database.Database.insertRow(Database.java:1321) 2017/08/16 15:13:02 - Table output.0 - at org.pentaho.di.trans.steps.tableoutput.TableOutput.writeToTable(TableOutput.java:262) 2017/08/16 15:13:02 - Table output.0 - ... 3 more 2017/08/16 15:13:02 - Table output.0 - Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'sonar.id' for key 'index_dashboard_domains_on_domain' 2017/08/16 15:13:02 - Table output.0 - at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 2017/08/16 15:13:02 - Table output.0 - at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) 2017/08/16 15:13:02 - Table output.0 - at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 2017/08/16 15:13:02 - Table output.0 - at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 2017/08/16 15:13:02 - Table output.0 - at com.mysql.jdbc.Util.handleNewInstance(Util.java:425) 2017/08/16 15:13:02 - Table output.0 - at com.mysql.jdbc.Util.getInstance(Util.java:408) 2017/08/16 15:13:02 - Table output.0 - at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:935) 2017/08/16 15:13:02 - Table output.0 - at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973) 2017/08/16 15:13:02 - Table output.0 - at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909) 2017/08/16 15:13:02 - Table output.0 - at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527) 2017/08/16 15:13:02 - Table output.0 - at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680) 2017/08/16 15:13:02 - Table output.0 - at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2494) 2017/08/16 15:13:02 - Table output.0 - at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1858) 2017/08/16 15:13:02 - Table output.0 - at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2079) 2017/08/16 15:13:02 - Table output.0 - at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2013) 2017/08/16 15:13:02 - Table output.0 - at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5104) 2017/08/16 15:13:02 - Table output.0 - at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1998) 2017/08/16 15:13:02 - Table output.0 - at org.pentaho.di.core.database.Database.insertRow(Database.java:1288) 2017/08/16 15:13:02 - Table output.0 - ... 4 more 2017/08/16 15:13:02 - Table output.0 - Finished processing (I=0, O=0, R=1, W=0, U=0, E=1)
它说:
Error inserting/updating row 2017/08/16 15:13:02 - Table output.0 - Duplicate entry 'sonar.id' for key 'index_dashboard_domains_on_domain' 2017/08/16 15:13:02 - Table output.0 - 2017/08/16 15:13:02 - Table output.0 - 2017/08/16 15:13:02 - Table output.0 - at org.pentaho.di.trans.steps.tableoutput.TableOutput.writeToTable(TableOutput.java:385)
sonar.id
是用户名,而不是主键,我想知道为什么我无法传输数据?但返回错误,说重复的键?