Sqoop 提示The connection property 'zeroDateTimeBehavior' only accepts values of the form: 'exception',

错误信息:The connection property 'zeroDateTimeBehavior' only accepts values of the form: 'exception', 'round' or 'convertToNull'. The value 'convertToNull ' is not in this set.
 

问题产生原因:Java 功能代码:通过Sqoop-1.4.7实现MySQL8 数据导入Hive-2.3.5 中

错误配置: "--connect","jdbc:mysql://192.168.60.206:3306/test?serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true",

正确配置: "--connect","jdbc:mysql://192.168.60.206:3306/test?serverTimezone=UTC&useSSL=false&allowPublicKeyRetrieval=true&zeroDateTimeBehavior=convertToNull",

从上面代码可以看出遗漏了zeroDateTimeBehavior 属性值

zeroDateTimeBehavior 可以接收的属性值如下:

默认是 exception,抛出异常

round 是返回:0001-01-01 00:00:00.0

convertToNull  就是转换为 null

你可能感兴趣的:(hadoop)