Sqoop ERROR tool.ImportTool: Imported Failed: There is no column found in the target table

来源:互联网 发布:关于农副产品的软件 编辑:程序博客网 时间:2024/03/29 09:19

Sqoop从oracle中导入数据到hive时,若在导入表不属于指定用户, 则在导入的表名前需要添加大写的所属用户的用户名
如:

 sqoop import --hive-import --connect "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=xx.xxx.xx.xxx)(PORT=1521)))(LOAD_BALANCE=yes)(CONNECT_DATA=(SERVICE_NAME=cass)))" --table TPLAN_GROUPS --hive-table TM_PLAN_GROUPS --username aaa --password 123456

报错信息如下:

ERROR tool.ImportTool: Imported Failed: There is no column found in the target table cas.TPLAN_GROUPS. Please ensure that your table name is correct.

将原–table参数改为 CAS.TPLAN_GROUPS
即:

 sqoop import --hive-import --connect "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=xx.xxx.xx.xxx)(PORT=1521)))(LOAD_BALANCE=yes)(CONNECT_DATA=(SERVICE_NAME=cass)))" --table CAS.TPLAN_GROUPS --hive-table TM_PLAN_GROUPS --username aaa --password 123456
阅读全文
0 0
原创粉丝点击