当前位置:网站首页>Kettle switch / case control to realize classification processing
Kettle switch / case control to realize classification processing
2022-07-27 19:20:00 【The bearer of dark cuisine】
When doing data cleaning , It is often necessary to judge the value of a certain field according to the content of one or several fields .
As usual, for multiple fields, I pass java Script complete . however ~~~
java Scripts often have all kinds of strange problems , such as ecplise There's no problem running ,java There is an error in the script .
Fucking .jpg
So even if it's a little troublesome, I want to change to a successful one , Now switch / case Component matching Set the field value to a constant Components work .
The two are located in the process (switch / case)、 application ( Set the field value to a constant ).
switch / case Component is introduced
1、Switch Field : The field is passed from the previous step ; Select a field , We will judge according to the value of this field and proceed to the next step accordingly .
chestnuts : I choose the cancelReson Field .
2、 Use strings to contain comparisons : Selective check . Not selecting represents accurate matching , Selection represents fuzzy matching .
chestnuts : as long as cancelReson Field contains Case Value will proceed to the corresponding step .
3、Case Value data type : Judge the type of the field according to its own value type .

Field type and java The corresponding me of type relation Blog used to write .
4、Case value : Criteria for judgment .
5、 Target steps : Data processing according to the value .

Set the field value to a constant
1、 Field : Fields need to follow switch / case In components switch / case Field Agreement .
2、 Value substitution : Corresponding assignment .
3、 Transform mask ( For date type ): Format date type data .

4、 Set as empty string ?: Whether to set the corresponding value to null .

边栏推荐
- 自控原理学习笔记-系统稳定性分析(2)-环路分析及Nyquist-Bode判据
- 利用 Fastjson json (简单粗暴版)
- Using functions to extract numbers from text strings in Excel
- An experience
- An article allows you to master threads and thread pools, and also solves thread safety problems. Are you sure you want to take a look?
- [cloud picture theory] the first time to know Huawei cloud micro service engine CSE in issue 250
- Normal distribution, lognormal distribution, generation of normal random numbers
- Usage of ref keyword
- 2022备战秋招10W字面试小抄pdf版,附操作系统、计算机网络面试题
- NPM basic use
猜你喜欢

Nacos的基本使用(1)——入门

连续时间系统的性能分析(2)-二阶系统性能改善方式PID,PR

MongoDB学习笔记(1)——安装MongoDB及其相关配置

内存管理A4

Rs2022/ cloud detection: semi supervised cloud detection in satellite images by considering the

kettle 分列、合并记录

收下这份实操案例,还怕不会用Jmeter接口测试工具

There is a problem with the time zone when the idea connects to the database. The server returns invalid timezone is red Need to set ‘serverTimezone‘ property.

ES6 learning notes (1) - quick start

每日一题(02):倒置字符串
随机推荐
[Luogu p4183] cow at large P (graph theory) (tree array)
Idea optimization strategy
收下这份实操案例,还怕不会用Jmeter接口测试工具
又有一个Repeater的例子
C interface knowledge collection suggestions collection
Express get/post/delete... Request
IDEA连接数据库时区问题,报红Server returns invalid timezone. Need to set ‘serverTimezone‘ property.
Rs2022/ cloud detection: semi supervised cloud detection in satellite images by considering the
kettle 合并记录 数据减少
C语言打印菱形
「测试新手百科」5 分钟快速上手Pytest 自动化测试框架
Power control
C#与Mysql数据库交互-Mysql配置及增删查改操作
大冤种们,新进测试行业,如何正确选择意向企业?
sql 时间处理(SQL SERVER\ORACLE)
Word 2007+ tips
SQL server top 关键字使用
图的遍历的定义以及深度优先搜索和广度优先搜索(二)
How can I get started quickly when I change my career to soft testing and job hopping to a new company?
The go zero singleton service uses generics to simplify the registration of handler routes