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
1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。