当前位置:网站首页>Kettle5.4 problem record
Kettle5.4 problem record
2022-07-19 04:36:00 【shibushi114】
One 、Kettle Of “Use Result Streaming Cursor” Options
ETL Tools Kettle in , Use mysql When connecting , There is one “Use Result Streaming Cursor” The option to , amount to ((com.mysql.jdbc.Statement)stat).enableStreamingResults(), In this case , Take only one piece of data at a time , Efficiency is very low .
however , Kettle In the configuration mysql When connecting , Advanced options will useCursorFetch=true and fetchsize Set up , According to the relationship of priority , Will be used preferentially RowDataCursor.
new edition mysql Solutions for
mysql jdbc Drive settings fetchsize There is useCursorFetch=true Talent
jdbc:mysql://127.0.0.1/:3306/test?useCursorFetch=true mysql edition , That is, the driver versions are 5 above , You can use setFetchSize The method . Tested ,debug After that . If there is no such parameter , only setFetchSize(Integer.MIN_VALUE); It works , But every time rs.next() Take one .oracle General default settings 10 strip .
this.statement = connection.prepareStatement(parsedQuery,ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
this.statement.setFetchSize(10);
in addition , At the same time useCursorFetch=true and ((com.mysql.jdbc.Statement)stat).enableStreamingResults() When setting , useCursorFetch Have a higher priority , This is the time , mysql Of jdbc The driver will use RowDataCursor.
Two 、 Table output Prepared statement contains too many placeholders
MySQL Of prepared statement Can only support at most 65535 Placeholder variables , But the reason is unknown . When inserting data in batch ,MySQL Of JDBC The driver will merge a single insert statement into a multi value insert statement ; And the scale of the data we import , A record has many columns , When importing data, it is 1000 When recording ,SQL The number of placeholders in is just less than 65535; When importing 2000 When recording ,SQL The number of midpoint markers has exceeded 65535, An error must be reported when the statement is executed .
performance parameter :
useServerPrepStmts=false
rewriteBatchedStatements=true
useCompression=true
code :
characterSetResults=utf8
characterEncoding=utf8
defaultFetchSize=500
useCursorFetch=true
Date format processing
zeroDateTimeBehavior=convertToNull
3、 ... and 、kettle ( Table input ) Inquire about MySQL data Encounters an error :
Unable to get timestamp from resultset at index 125
In the discovery data timestamp Type value contain 0000-00-00 or 0000-00-00 00:00:00 It's a mistake to make when you're in the game
jdbc driver Deal with problems caused by date types , Solve it in the following way :
1、 Use date_format Function formatting
2、 stay jdbc URL Link add parameters (zeroDateTimeBehavior=convertToNull):jdbc:mysql://yourserver:3306/yourdatabase?zeroDateTimeBehavior=convertToNull
3、 If it is hibernate The following parameters can be configured :
<property name="hibernate.connection.zeroDateTimeBehavior">convertToNull</property>
pan call ktr The way
An error is reported after running for a period of time :
2022/03/01 07:02:31 - Table input .0 - Error connecting to database: (using class oracle.jdbc.driver.OracleDriver)
2022/03/01 07:02:31 - Table input .0 - IO error : Connection reset
resolvent , stay sh In the document java Add parameters to the command line :-Djava.security.egd=file:/dev/../dev/urandom
边栏推荐
- HCR Huichen is walking on the north slope, a giant beast swimming into digital marketing services
- OpenLDAP自定义schema
- Cabasicanimation pause \ enterprise action
- 分布式笔记(02)— 分布式缓存之 Redis(用途、特点、高可用方案 Redis Cluster、Twemproxy、Codis 简要说明)
- Swift - Generic
- Fetch request - simple record
- ospf防环
- Analysis of network attack detection technology for NDN
- CAD视频课程推荐 b站
- Oracle操作openldap的权限问题
猜你喜欢

HCR Huichen is walking on the north slope, a giant beast swimming into digital marketing services

微信小程序之项目结构
![[Unity] 交互之双击](/img/28/8c9c3dd9de413ff8e6373ea111b04f.png)
[Unity] 交互之双击

百度地图技术概述,及基本API与WebApi的应用开发

VirtualLab基础实验教程-7.偏振(3)

Gin framework principle

Codeforces Round #807 (Div 2.) AB

Xcode11 add a boot page (the launch images source option is missing after the upgrade)

C language explanation series - practice and consolidation of circular sentences, explanation of binary search

Data types of basic knowledge of C language
随机推荐
Common errors in golang compilation
Oracle操作openldap的权限问题
[Huang ah code] Introduction to MySQL - 5. Database tips: a single column group by will, and multiple columns?
Phthon3 install mysqldb error problem solving reason: image not found
OSPF routing control, anti ring related knowledge
Optimization and configuration of OSPF
Hello World driver
对称加密与非对称加密
详解Pod和容器资源管理和分配(CPU和内存分配,临时存储管理)
2022/7/16 周赛
Gin framework principle
Android kotlin custom LinearLayout
Leetcode remove element
[pits]packets go:428: busy buffer invalid connection
Overview of Baidu map technology, and application development of basic API and webapi
sql中的substr与substring函数用法
Xcode11 add a boot page (the launch images source option is missing after the upgrade)
使用小丸工具箱进行极限视频压缩
【每日一题】剑指 Offer II 041. 滑动窗口的平均值
kettle5.4问题记录