当前位置:网站首页>kettle如何处理文本数据传输为‘‘而不是null
kettle如何处理文本数据传输为‘‘而不是null
2022-07-27 05:11:00 【神芷迦蓝寺】
kettle在传输过程中有时候会遇到字段数据为空,是null,但是传输的目标字段要求非空
比如kettle 传输了三个字段,id,name,age,文本字符该字段为空,传入的是null,则就会报字段限制错误
这个时候我们可以在${KETTLE_HOME}/.kettle/kettle.properties文件里加一句
# 自动填补空为''
KETTLE_EMPTY_STRING_DIFFERS_FROM_NULL=Y
那么对于文件里的空字符,会自动转换为''
tips:本字段仅对STRING类型生效,由于接口表全部是STRING类型字段,这样的话时间,数字字段也被传入了'',接口表再传入主表时便会报错:''不能作为DATE或NUMBER
解决方法:1.文本数据传入接口表时,即使接口表字段类型为字符,依然选择其主表字段类型,而不是一味设置STRING
2.转换时全设为STRING,在接口表转为主表时对非字符字段进行case when col1 = '' then null else col1 end col1转换
边栏推荐
- First knowledge of C language - why does every C program have a main function
- graph-node部署
- ES6中new一个箭头函数会怎样
- 选择正规的资质好的期货公司开户
- Promise's understanding and its instance method
- C language string introduction and related operation functions
- 「PHP基础知识」PHP语句和语句块
- What is the difference between foreach and map methods in JS
- GameFi如何破圈,AQUANEE靠真正“P2E”展现风采
- Plato Farm有望通过Elephant Swap,进一步向外拓展生态
猜你喜欢
随机推荐
页面布局中元素定位的几种方式
自我理解思考
Usage and differences among let, const and VaR
ES6中new一个箭头函数会怎样
[CISCN2019 华东南赛区]Web11 1
维持登录,路由跳转
个人收款码不得用于经营收款
[BJDCTF2020]EasySearch 1
怎样才能拿到期货开户最低的手续费?
First knowledge of C language -- what is C language
XSS知识点
User registration login
JS中arguments类数组
刷脸支付永远不会过时只会不断的变革
「PHP基础知识」PHP语句和语句块
dirsearch[目录扫描工具]
C language elementary level -- branch statement (if, switch)
C language string introduction and related operation functions
User management - paging
User login - and create and verify SMS verification code






![[网鼎杯 2020 朱雀组]Nmap 1两种解法](/img/fa/b1349cb42b5768b7510217239ba73a.png)


