当前位置:网站首页>kettle switch / case 控件实现分类处理
kettle switch / case 控件实现分类处理
2022-07-27 16:28:00 【黑暗料理界的扛把子】
在做数据清洗的时候,经常要根据一个或几个字段的内容进行某一字段值的判断。
往常针对多个字段我都是通过 java脚本 完成。但是~~~
java脚本经常会出现各种奇奇怪怪的问题,比如ecplise运行没问题,java脚本就出现错误。
蛋疼.jpg
所以哪怕麻烦点也想换个一次成功的,这时候switch / case 组件搭配 将字段值设置为常量 组件发挥了作用。
二者分别位于流程(switch / case)、应用(将字段值设置为常量)。
switch / case 组件介绍
1、Switch 字段 :字段从上一步骤当中传过来;选择某字段后,将会根据该字段的值进行判断并进行相应下一步。
栗子:我选择的cancelReson字段。
2、使用字符串包含比较 :选择性勾选。不选择代表精准匹配,选择代表模糊匹配。
栗子:只要cancelReson字段包含Case值就会进行到对应的步骤。
3、Case值数据类型:根据自己的值类型判断字段所属类型。

字段类型和java类型关系的对应我以前博客有写。
4、Case值 :用于判断的标准。
5、目标步骤:根据值进行数据处理。

将字段值设置为常量
1、字段:字段需要跟 switch / case 组件当中的 switch / case 字段 一致。
2、值替换:对应的赋值。
3、转换掩码(对日期类型):对日期类型的数据进行格式化。

4、设为空串?:是否将对应值设置为空。

边栏推荐
猜你喜欢

阿里云视频点播服务的开通和使用

Unity shows Kinect captured shots

Self control principle learning notes - system stability analysis (2) - loop analysis and Nyquist bode criterion

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.

How can I get started quickly when I change my career to soft testing and job hopping to a new company?

Blog Garden beautification tutorial

CMD command

Unity-显示Kinect深度数据

Performance analysis of continuous time system (1) - performance index and first and second order analysis of control system

自控原理学习笔记-系统稳定性分析(2)-环路分析及Nyquist-Bode判据
随机推荐
Unity learning notes (realize the conveyor belt)
Imitation thread deduction
收下这份实操案例,还怕不会用Jmeter接口测试工具
Sentinel1.8.4 persistent Nacos configuration
Ruiji takeout notes
Basic concepts of Nacos and single machine deployment
新系统安装MySQL+SQLyog
NPM, cnpm Taobao image
The great idea of NS2
JMeter interface automation - how to solve the content type conflict of request headers
Ruiji takeout SQL table
C # one method returns multiple values. Suggestions collection
怎样产生标准分布或高斯分布的随机数
汇编语言入门基础(1)
Useful resources for ns2
Latex use - control the display position of tables or graphics
Latex use - subfigure vertical graphics
Nodejs template engine EJS
Some advice for NS2 beginner.
进行接口测试时,连接数据库,对数据源进行备份、还原、验证操作