当前位置:网站首页>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、设为空串?:是否将对应值设置为空。

边栏推荐
- 自控原理学习笔记-系统稳定性分析(1)-BIBO稳定及Routh判据
- Dynamic proxy
- MongoDB
- `this.$emit` 子组件给父组件传递多个参数
- Product recommendation and classified product recommendation
- 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.
- Resource for NS2 beginner
- ES6数值的扩展
- JMeter interface automation - how to solve the content type conflict of request headers
- Latex use - subfigure vertical graphics
猜你喜欢

Unity-显示Kinect深度数据

200行代码快速入门文档型数据库MonogoDB

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

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?

Kinect for unity3d - backgroundremovaldemo learning

Opening and using Alibaba cloud object storage OSS

Kinect2 for unity3d - avatardemo learning

Subscription and use of Alibaba cloud video on demand service

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

「测试新手百科」5 分钟快速上手Pytest 自动化测试框架
随机推荐
WSN Journal indexed by SCI(转)
Kinect2 for unity3d - avatardemo learning
MongoDB学习笔记(1)——安装MongoDB及其相关配置
Usage of ref keyword
MicaZ+Tinyos学习笔记(1)
Kinect for Unity3d----KinectManager
Micaz+tinyos learning notes (1)
连续时间系统的性能分析(2)-二阶系统性能改善方式PID,PR
CMD command
express
Resource for NS2 beginner
asp. Net experience
Using MATLAB to generate graphics for journals and conferences - plot
电磁场学习笔记-矢量分析和场论基础
用函数在Excel中从文本字符串提取数字
Interceptor interceptor
Unity display Kinect depth data
一篇让你掌握线程和线程池,还解决了线程安全问题,确定不看看?
贪心法,拟阵和亚模函数(refer)
Double insurance for line breaking