【发布时间】:2017-02-18 02:55:25
【问题描述】:
在 mysql 中有一个表,其中一些列具有空值。我想 sqoop 将表导入配置单元。当我执行 sqoop 导入时,我会在 mysql 表中具有 null 的列中获取所有 null 值。
我正在做以下事情
sqoop import --connect jdbc:xxxxxx --username xxxx --password xxxx \
--query "select * from hive_db.xxxx where \$CONDITIONS" --null-string '' \
--null-non-string '' -m 1 --hive-import --hive-database hivedatabase \
--hive-table table --as-parquetfile --create-hive-table --target-dir /user/hive/warehouse/hivedatabase.db/table
但我仍然将蜂巢列作为 Null intsead of empty
为什么会这样?我怎样才能得到想要的结果。
【问题讨论】: