添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
1.1报错信息
 ERROR (version 8.1.0.0-365, build 8.1.0.0-365 from 2018-04-30 09.42.24 by buildguy) : Because of an error, this step can't continue: 
2018/07/26 11:28:53 - sql_data_output.0 - ERROR (version 8.1.0.0-365, build 8.1.0.0-365 from 2018-04-30 09.42.24 by buildguy) : org.pentaho.di.core.exception.KettleException: 
2018/07/26 11:28:53 - sql_data_output.0 - Error batch inserting rows into table [users].
2018/07/26 11:28:53 - sql_data_output.0 - Errors encountered (first 10):
2018/07/26 11:28:53 - sql_data_output.0 - 
2018/07/26 11:28:53 - sql_data_output.0 - 
2018/07/26 11:28:53 - sql_data_output.0 - Error updating batch
2018/07/26 11:28:53 - sql_data_output.0 - Field 'rec_source' doesn't have a default value
2018/07/26 11:28:53 - sql_data_output.0 - 
2018/07/26 11:28:53 - sql_data_output.0 - 
2018/07/26 11:28:53 - sql_data_output.0 - 	at org.pentaho.di.trans.steps.tableoutput.TableOutput.writeToTable(TableOutput.java:349)
2018/07/26 11:28:53 - sql_data_output.0 - 	at org.pentaho.di.trans.steps.tableoutput.TableOutput.processRow(TableOutput.java:125)
2018/07/26 11:28:53 - sql_data_output.0 - 	at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
2018/07/26 11:28:53 - sql_data_output.0 - 	at java.lang.Thread.run(Thread.java:748)
2018/07/26 11:28:53 - sql_data_output.0 - Caused by: org.pentaho.di.core.exception.KettleDatabaseBatchException: 
1.2 原因:表字段rec_source没有设置正确的值,所以报错
1.3 方法:在相应的转换中为字段设置值
2.1 报错信息
2018/10/17 17:43:12 - TableOutput-fact_cfc_user_open_advert.0 - ERROR (version 8.1.0.0-365, build 8.1.0.0-365 from 2018-04-30 09.42.24 by buildguy) : Unexpected batch update error committing the database connection.
2018/10/17 17:43:12 - TableOutput-fact_cfc_user_open_advert.0 - ERROR (version 8.1.0.0-365, build 8.1.0.0-365 from 2018-04-30 09.42.24 by buildguy) : org.pentaho.di.core.exception.KettleDatabaseBatchException: 
2018/10/17 17:43:12 - TableOutput-fact_cfc_user_open_advert.0 - Error updating batch
2018/10/17 17:43:12 - TableOutput-fact_cfc_user_open_advert.0 - Data truncation: Out of range value for column 'confirm_status_key' at row 1
2018/10/17 17:43:12 - TableOutput-fact_cfc_user_open_advert.0 - 
2018/10/17 17:43:12 - TableOutput-fact_cfc_user_open_advert.0 - 	at org.pentaho.di.core.database.Database.createKettleDatabaseBatchException(Database.java:1425)
2018/10/17 17:43:12 - TableOutput-fact_cfc_user_open_advert.0 - 	at org.pentaho.di.core.database.Database.emptyAndCommit(Database.java:1414)
2018/10/17 17:43:12 - TableOutput-fact_cfc_user_open_advert.0 - 	at org.pentaho.di.trans.steps.tableoutput.TableOutput.dispose(TableOutput.java:586)
2018/10/17 17:43:12 - TableOutput-fact_cfc_user_open_advert.0 - 	at org.pentaho.di.trans.step.RunThread.run(RunThread.java:97)
2018/10/17 17:43:12 - TableOutput-fact_cfc_user_open_advert.0 - 	at java.lang.Thread.run(Thread.java:745)
2018/10/17 17:43:12 - TableOutput-fact_cfc_user_open_advert.0 - Caused by: java.sql.BatchUpdateException: Data truncation: Out of range value for column 'confirm_status_key' at row 1
2018/10/17 17:43:12 - TableOutput-fact_cfc_user_open_advert.0 - 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
2018/10/17 17:43:12 - TableOutput-fact_cfc_user_open_advert.0 - 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
2018/10/17 17:43:12 - TableOutput-fact_cfc_user_open_advert.0 - 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
2018/10/17 17:43:12 - TableOutput-fact_cfc_user_open_advert.0 - 	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
2018/10/17 17:43:12 - TableOutput-fact_cfc_user_open_advert.0 - 	at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
2018/10/17 17:43:12 - TableOutput-fact_cfc_user_open_advert.0 - 	at com.mysql.jdbc.Util.getInstance(Util.java:408)
2018/10/17 17:43:12 - TableOutput-fact_cfc_user_open_advert.0 - 	at com.mysql.jdbc.SQLError.createBatchUpdateException(SQLError.java:1163)
2018/10/17 17:43:12 - TableOutput-fact_cfc_user_open_advert.0 - 	at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1778)
2018/10/17 17:43:12 - TableOutput-fact_cfc_user_open_advert.0 - 	at com.mysql.jdbc.PreparedStatement.executeBatchInternal(PreparedStatement.java:1262)
2018/10/17 17:43:12 - TableOutput-fact_cfc_user_open_advert.0 - 	at com.mysql.jdbc.StatementImpl.executeBatch(StatementImpl.java:970)
2018/10/17 17:43:12 - TableOutput-fact_cfc_user_open_advert.0 - 	at org.pentaho.di.core.database.Database.emptyAndCommit(Database.java:1401)
2018/10/17 17:43:12 - TableOutput-fact_cfc_user_open_advert.0 - 	... 3 more
2.2 报错原因

查看目标表的字段设置,如下:

mysql> desc crm_fact_cfc_user_open_advert;
+---------------------+------------------------+------+-----+-------------------+----------------+
| Field               | Type                   | Null | Key | Default           | Extra          |
+---------------------+------------------------+------+-----+-------------------+----------------+
| id                  | bigint(20)             | NO   | PRI | NULL              | auto_increment |
| open_id             | bigint(20) unsigned    | NO   | MUL | NULL              |                |
| serial_id           | varchar(64)            | NO   | PRI | 0                 |                |
| advert_url_id       | bigint(20) unsigned    | NO   |     | 0                 |                |
| order_channel_key   | decimal(14,2) unsigned | NO   |     | 1.00              |                |
| user_id             | bigint(20) unsigned    | NO   | MUL | 0                 |                |
| user_type_key       | int(10)                | NO   |     | NULL              |                |
| confirm_status_key  | decimal(14,2) unsigned | NO   |     | 0.00              |                |
| confirm_time        | datetime               | YES  |     | NULL              |                |
| activity_status_key | decimal(14,2) unsigned | NO   |     | 0.00              |                |
| order_id            | bigint(20) unsigned    | YES  |     | 0                 |                |
| gmt_create          | datetime               | NO   |     | CURRENT_TIMESTAMP |                |
| gmt_modify          | datetime               | NO   |     | CURRENT_TIMESTAMP |                |
| is_deleted          | tinyint(4) unsigned    | NO   |     | 0                 |                |
| rec_source          | varchar(20)            | NO   |     |                   |                |
| hash_diff           | varchar(32)            | YES  |     | NULL              |                |
| ETLCreatedDate      | datetime               | NO   |     | CURRENT_TIMESTAMP |                |
| ETLModifiedDate     | datetime               | NO   |     | CURRENT_TIMESTAMP |                |
| process_id          | bigint(20)             | YES  |     | NULL              |                |
+---------------------+------------------------+------+-----+-------------------+----------------+
19 rows in set (0.00 sec)

可以发现虽然confirm_status_key字段有一定长度,但是为啥还会报错呢?因为confirm_status_key是可取-1的,但是建表语句中的confirm_status_key是有unsigned修饰的,导致超出范围。所以报错

2.3 解决办法

修改建表语句,去除所有的unsigned修饰的字段。

kettle常见报错集锦报错一 ERROR (version 8.1.0.0-365, build 8.1.0.0-365 from 2018-04-30 09.42.24 by buildguy) : Because of an error, this step can't continue: 2018/07/26 11:28:53 - sql_data_output.0 - ER... kettle连接Oracle报错 报错信息 错误连接数据库 [aaa] : org.pentaho.di.core.exception.KettleDatabaseException: Error occurred while trying to connect to the database Error connecting to database: (using class oracle.jdbc.driver.OracleDriver) Listener refused the connection with th
下载地址:(JDK1.8才可支持Kettle7.0以后的版本)运行Spoon.bat启动程序进入主界面,左上角点击文件-新建-转换保存为demo.ktr左侧选择核心对象面板。”在输入文件夹下选择表输入并把它拖动到右侧编辑区。双击编辑区的表输入图标,编辑数据输入来源。点击数据库连接右侧的新建按钮,按demo背景中的要求,配置数据库参数。配置后点击测试如果报错找不到驱动包,复制oracle的驱动jar文件到ETL(Kettle)的lib目录下(我这里使用的是jdbc7.jar)点击获取SQL查询语句”(等待时间较长),选择要迁移的表,点击确定选择否重复以上步骤2,在输出文件夹下选择表输出并把它拖动
DB2 SQLCODE=-206, SQLSTATE=42703 定义表字段问题 解决办法 检查建表字段(要用大写),在DB2中,默认情况下所有的名称都可包含字符:A-Z(大写) 0到9 @、#、$和_(下划线),名称不能以数字和下划线开头 ; Error: SQLCODE=-302, SQLSTATE=22001, SQLERR... 2021/09/28 17:26:58 - 表输出.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: 2021/09/28 17:26:58 - 表输出.0 - ERROR (version 7.1.0.0-12, build Because of an error, this step can't continue: org.pentaho.di.core.exception.KettleException: Error inserting row into table [BOND_ISSUE] with values: [291209410397], [8 Traceback (most recent call last): File “D:/flaskProject/test.py”, line 35, in test pool.apply(self.out, args=(i,)) File “Python37-32\lib\multiprocessing\pool.py”, line 261, in apply return self.apply_async(func, args, kwds).get() File “\lib\multiprocessing\pool.py”, line 657, in get raise se