当前位置:网站首页>How does kettle handle text data transfer as' 'instead of null

How does kettle handle text data transfer as' 'instead of null

2022-07-27 08:02:00 Shenzhi Kalan Temple

kettle Sometimes, field data is empty during transmission , yes null, However, the target field of transmission should be non empty

such as kettle Three fields were transferred ,id,name,age, Text character this field is empty , What's coming in is null, Field limit error will be reported

This time we can in ${KETTLE_HOME}/.kettle/kettle.properties Add a sentence to the document

# Auto fill blank is ''
KETTLE_EMPTY_STRING_DIFFERS_FROM_NULL=Y

Then for the empty characters in the file , Will automatically switch to ''

tips: This field is only applicable to STRING Type validation , Because the interface tables are all STRING The type field , In this case, time , Numeric fields are also passed in '', An error will be reported when the interface table is imported into the main table :'' Can not act as DATE or NUMBER

resolvent :1. When text data is transferred into the interface table , Even if the field type of the interface table is character , Still select its main table field type , Instead of blindly setting STRING

2. Set all to STRING, When the interface table is converted to the main table, the non character fields are case when col1 = '' then null else col1 end col1 transformation

原网站

版权声明
本文为[Shenzhi Kalan Temple]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/208/202207270511022218.html