【发布时间】:2016-10-02 03:07:49
【问题描述】:
我能够使用 sqoop 将 mysql 表“标题”导入 hdfs,使用如下命令:
sqoop import --connect jdbc:mysql://localhost/employees --username=root -P --table=titles --target-dir=titles --m=1
现在我想导入到 hive,如果我使用以下命令:
sqoop import --connect jdbc:mysql://localhost/employees --username=root -P --table titles --hive-import
我会被提示:
输出目录hdfs://localhost:9000/user/root/titles已经存在
在 hive 中,如果我显示表,我会得到以下信息:
hive> show tables;
OK
dept_emp
emp
myfirsthivetable
parted1emp
partitionedemp
你可以看到 hive 中没有名为titles的表
我对此感到困惑,对于sqoop导入的数据,hdfs和hive之间是否存在1对1的关系?提示是什么意思?
感谢您的启发。
【问题讨论】: