Hi,
I imported the tables to the path /apps/hive/warehouse/shitansu.db by using Sqoop import-all-tables command (Not with hive import).
Import went successful and I can see the table but not able to query those tables from HIVE. Please find the below code:
Import command:
[shubhaprasadsamal@gw01 ~]$ sqoop import-all-tables --connect “jdbc:mysql://nn01.itversity.com:3306/retail_db” --username=retail_dba --password=itversity --warehouse-dir=/apps/hive/warehouse/shitansu.db
hive> dfs -ls /apps/hive/warehouse/shitansu.db;
Found 6 items
drwxr-xr-x - shubhaprasadsamal hdfs 0 2017-01-05 14:51 /apps/hive/warehouse/shitansu.db/categories
drwxr-xr-x - shubhaprasadsamal hdfs 0 2017-01-05 14:51 /apps/hive/warehouse/shitansu.db/customers
drwxr-xr-x - shubhaprasadsamal hdfs 0 2017-01-05 14:51 /apps/hive/warehouse/shitansu.db/departments
drwxr-xr-x - shubhaprasadsamal hdfs 0 2017-01-05 14:52 /apps/hive/warehouse/shitansu.db/order_items
drwxr-xr-x - shubhaprasadsamal hdfs 0 2017-01-05 14:52 /apps/hive/warehouse/shitansu.db/orders
drwxr-xr-x - shubhaprasadsamal hdfs 0 2017-01-05 14:52 /apps/hive/warehouse/shitansu.db/products
hive> use shitansu;
OK
Time taken: 0.027 seconds
hive> show tables;
OK
Time taken: 0.021 seconds
hive> select count(1) from categories;
FAILED: SemanticException [Error 10001]: Line 1:21 Table not found 'categories’
hive>
Thanks,
Shitansu.