当前位置:网站首页>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;
边栏推荐
- 2022 0726 顾宇佳 学习笔记
- 36 - new promise method: allsettled & any & race
- 查看服务器重启前的 dmesg 日志
- Instruction set x digital technology accelerates the digital transformation of government and enterprises, and builds Unicorn enterprise alliance in DT field
- 35. Search insert position
- Firefox browser, when accessing Tencent cloud server, failed to establish a secure connection.
- How MySQL executes query statements
- Jmeter:接口自动化测试-BeanShell对数据库数据和返回数据比较
- flink cdc 抽取oracle的数据,会不断的占用oracle的内存吗,最后引发ora-040
- C程序代码的内存结构分析
猜你喜欢
随机推荐
Internal class -- just read this article~
UiAutomator常用类之UI手势动作
(2022 Niuke multi school III) j-journey (Dijkstra)
MySQL query operation index optimization practice
Instruction set x digital technology accelerates the digital transformation of government and enterprises, and builds Unicorn enterprise alliance in DT field
(2022杭电多校三)1011.Taxi(曼哈顿最值+二分)
查看服务器重启前的 dmesg 日志
36 - new promise method: allsettled & any & race
腾讯云服务器SSH链接自动断开解决方法
[Vani有约会]雨天的尾巴
在rhel7.3中编译和使用log4cxx
DDD Domain Driven Design Notes
Drools (5): drools advanced syntax
Algorithm -- Fibonacci sequence (kotlin)
Tableau prep is connected to maxcompute and only writes simple SQL. Why is this error reported?
How to submit C4d animation to cloud rendering farm for fast rendering?
oracle清理含有引用分区的表的数据库磁盘空间
用shell来计算文本中的数字之和
(posted) comparison of Eureka, consumer and Nacos 1
Li Mu hands-on learning, in-depth learning, V2 transformer and code implementation









