当前位置:网站首页>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;
边栏推荐
- How MySQL executes query statements
- Codeforces Round #787 (Div. 3)(7/7)
- Oracle数据库问题
- C language pthread_ cleanup_ Push() and pthread_ cleanup_ Pop() function (used for the resource cleaning task after the termination action in the critical resource program segment to avoid deadlock. T
- 2022 0726 Gu Yujia's study notes
- 在kettle使用循环来处理表中的数据
- Zabbix: 将收集到值映射为易读的语句
- (2022 Niuke multi school III) a-ancestor (LCA)
- (2022杭电多校三)1009.Package Delivery(贪心)
- 12. Integer to Roman整数转罗马数字
猜你喜欢

Single arm routing (explanation + experiment)

VLAN trunk实验

C4D云渲染平台选哪家合作?

使用反射实现动态修改@Excel的注解属性

(2022 Hangdian multi school III) 1009.package delivery (greedy)

高级IO提纲

2022 0726 顾宇佳 学习笔记

Instruction set x digital technology accelerates the digital transformation of government and enterprises, and builds Unicorn enterprise alliance in DT field

Federal Reserve SR 11-7: Guidance on model risk management - Wanzi collection

Chapter 6 Shell Logic and Arithmetic
随机推荐
How MySQL executes query statements
在Perl程序中暴露Prometheus指标
MySQL query operation index optimization practice
Pg_relation_size 问题
centos7中关闭oracle服务自动启动的功能
C4D动画如何提交云渲染农场快速渲染?
Linear table -- stack and queue
Pan Aimin, chairman of instruction set, attended the 2022 ecug con to speak for China's technical forces
No.0 training platform course-2. SSRF Foundation
多线程【初阶-上篇】
如何借助自动化工具落地DevOps|含低代码与DevOps应用实践
Guava的基础功能与集合
How to submit C4d animation to cloud rendering farm for fast rendering?
2022 0726 顾宇佳 学习笔记
Calledprocesserror during pre commit install
Automatically generate UML sequence diagram according to text (draw.io format)
一个优先级顺序的SQL问题
Tableau prep is connected to maxcompute and only writes simple SQL. Why is this error reported?
Jmeter:接口自动化测试-BeanShell对数据库数据和返回数据比较
Excuse me, is there a big delay in individual capture when someone uses Oracle xStream? How to solve the delay problem