1
votes

I am trying for sqoop import from SQL Server into Hive. When I execute sqoop-import command, the problem is that import task gets completed, I can see the complete data on HDFS (under /user/hive/warehouse/table_name_dir) but when I execute "SHOW TABLES " command in HIve CLI I am not able to see the table in the list.

(Once I have tried like: after importing the table same thing happened as above then I run the CREATE TABLE QUERY in Hive CLI taking the same field as that was in imported one and I was able to see and access the table in Hive CLI. But I dont think this is effective way every time I perform).

Pls suggest me some solution Is there any step I missed out or is there any problem? I am not getting why it is happening? Thanks to all

2

2 Answers

2
votes

I have faced similar issue and spent almost 4 days on this. I tried almost all the available options, but could not succeed.

Later, I found something interesting at https://issues.apache.org/jira/browse/HADOOP-5887

I think, this issue has been fixed in Hadoop 0.21.0 and later releases. So, if you can uplgrade your version to 0.21.0, this issue might get fixed up. I am trying to upgrade it even.

Thanks,

Raghu

1
votes

You can try create-hive-table tool to populate a Hive metastore with the table definition based on the table present in HDFS.

Follow the link for create-hive-table