当前位置:网站首页>Using loops to process data in tables in kettle
Using loops to process data in tables in kettle
2022-07-27 07:25:00 【hawanglc】
occasionally , If kettle When the data of the source table in a transaction is very large , It is not advisable to read all the data in the source table into memory at once . stay mysql in , We can cycle , Use limit To quantitatively obtain part of the data for processing . namely , pivotal sql yes :select * from table_name limit current_value, step_value; The following is a demonstration of ideas .
1: Get all the quantities in the record , Initialize the current cycle value, etc ;
2: The judgment condition of the cycle is : The current cycle value is less than the maximum cycle value
2.1: modify sql The starting value of the query in the statement
2.2: Use a transformation to process the query results , This example is to append the result to the file ;
2.3: Add the current cycle value 1;
The total job flow chart

The first 1 Configuration information of step

The first 2 Configuration information of step

The first 2.1 Configuration information of step
var stepValue = new Number(parent_job.getVariable("STEP_VALUE"));
var i = new Number(parent_job.getVariable("CURRENT_LOOP"))*stepValue;
parent_job.setVariable("CURRENT_CURSOR",i);
true;
The first 2.2 Configuration information of step

The first 2.3 Configuration information of step
var i = new Number(parent_job.getVariable("CURRENT_LOOP"))+1;
parent_job.setVariable("CURRENT_LOOP",i);
true;
边栏推荐
- 使用pip命令切换不同的镜像源
- 使用sqlplus显示中文为乱码的解决办法
- 使用popen来执行一个命令并获得返回结果
- Advanced IO outline
- Federal Reserve SR 11-7: Guidance on model risk management - Wanzi collection
- "Weilai Cup" 2022 Niuke summer multi school training camp 1
- 网络入门——vlan及trunk概述
- Instruction set x digital technology accelerates the digital transformation of government and enterprises, and builds Unicorn enterprise alliance in DT field
- 端口转发小结
- Sort increment with typescript
猜你喜欢

如何借助自动化工具落地DevOps|含低代码与DevOps应用实践

Relevant principles of MySQL index optimization

单臂路由(讲解+实验)

在kettle使用循环来处理表中的数据

【WSL2】配置连接 USB 设备并使用主机的 USB 摄像头

(2022杭电多校三)1009.Package Delivery(贪心)

DDD Domain Driven Design Notes

C# Winfrom 常用功能整合-2

Quartus: an error is reported when adding a.V file to someone else's project

MySQL2
随机推荐
No.0 training platform course-2. SSRF Foundation
Pan Aimin, chairman of instruction set, attended the 2022 ecug con to speak for China's technical forces
Golang controls the number of goroutines and obtains processing results
functools模块
Oracle database problems
tableau prep连接maxcompute,只是书写很简单的sql,为啥报这个错误呢?
MySQL index failure and solution practice
美联储SR 11-7:模型风险管理指南(Guidance on Model Risk Management)-万字收藏
The possibility of metauniverse from the perspective of technical principles: how Omniverse "built" Mars
2022 0726 Gu Yujia's study notes
使用pip命令切换不同的镜像源
?实验 7 基于 Mysql 的 PHP 管理系统实现
Relevant principles of MySQL index optimization
[Vani有约会]雨天的尾巴
C# 常用功能整合-3
Introduction to network -- overview of VLAN and trunk
LogCat工具
使用反射实现动态修改@Excel的注解属性
端口转发小结
(2022 Niuke multi school III) j-journey (Dijkstra)