4.2.8 命令&参数:create-hive-table

生成与关系数据库表结构对应的hive表结构。

sqoop create-hive-table \
--connect jdbc:mysql://hadoop102:3306/company \
--username root \
--password 000000 \
--table staff \
--hive-table hive_staff

参数

序号 参数 说明
1 --hive-home <dir> Hive的安装目录,可以通过该参数覆盖掉默认的Hive目录
2 --hive-overwrite 覆盖掉在Hive表中已经存在的数据
3 --create-hive-table 默认是false,如果目标表已经存在了,那么创建任务会失败
4 --hive-table 后面接要创建的hive表
5 --table 指定关系数据库的表名
Copyright © 尚硅谷大数据 2019 all right reserved,powered by Gitbook
该文件最后修订时间: 2019-03-30 12:29:57

results matching ""

    No results matching ""