sqoop导入数据进入hive中,明明显示导入成功了,可是在hive中就是找不到导入的表。
我的版本号:hive-1.2.1 sqoop-1.4.7
我的解决方法: 将 hive/conf/hive-site.xml 复制到 sqoop/conf/ 下;
[root@hadoop01 ~]
之后就可以在hive中查到表了。
[root@hadoop01 ~]
Logging initialized using configuration in jar:file:/usr/local/hive1.2.1/lib/hive-common- 1.2.1.jar!/hive-log4j.properties
hive (default)> show tables;
OK
tab_name
emp
Time taken: 0.753 seconds, Fetched: 1 row(s)
hive (default)> select * from emp;
OK
empno ename job mgr hiredate sal comm deptno
7369 SMITH CLERK 7902 1980-12-17 800.0 NULL 20
7499 ALLEN SALESMAN 7698 1981-02-20 1600.0 300.0 30
7521 WARD SALESMAN 7698 1981-02-22 1250.0 500.0 30
|