Hello,
I am trying to create a different schema for AVRO based tables. Below is the command m using. I can see the proper directory structure with all the data files with .avro extension but when i log into HIVE & execute show tables; under retail_avro.db schema there are no tables
> sqoop import-all-tables \
> -m 2 \
> --connect "jdbc:mysql://quickstart.cloudera:3306/retail_db" \
> --username=retail_dba \
> --password=cloudera \
> --warehouse-dir=/user/hive/warehouse/retail_avro.db \
> --create-hive-table \
> --as-avrodatafile
After the above Command below is the Output if i access using hdfs commands:
[cloudera@quickstart ~]$ hdfs dfs -ls /user/hive/warehouse/retail_avro.db
Found 6 items
drwxr-xr-x - cloudera hive 0 2016-12-30 04:25 /user/hive/warehouse/retail_avro.db/categories
drwxr-xr-x - cloudera hive 0 2016-12-30 04:25 /user/hive/warehouse/retail_avro.db/customers
drwxr-xr-x - cloudera hive 0 2016-12-30 04:25 /user/hive/warehouse/retail_avro.db/departments
drwxr-xr-x - cloudera hive 0 2016-12-30 04:25 /user/hive/warehouse/retail_avro.db/order_items
drwxr-xr-x - cloudera hive 0 2016-12-30 04:26 /user/hive/warehouse/retail_avro.db/orders
drwxr-xr-x - cloudera hive 0 2016-12-30 04:26 /user/hive/warehouse/retail_avro.db/products
[cloudera@quickstart ~]$
[cloudera@quickstart ~]$
[cloudera@quickstart ~]$ hdfs dfs -ls /user/hive/warehouse/retail_avro.db/categories
Found 3 items
-rw-r--r-- 1 cloudera hive 0 2016-12-30 04:25 /user/hive/warehouse/retail_avro.db/categories/_SUCCESS
-rw-r--r-- 1 cloudera hive 1007 2016-12-30 04:25 /user/hive/warehouse/retail_avro.db/categories/part-m-00000.avro
-rw-r--r-- 1 cloudera hive 959 2016-12-30 04:25 /user/hive/warehouse/retail_avro.db/categories/part-m-00001.avro
And When i login into HIVE :
hive> use retail_avro;
OK
Time taken: 1.942 seconds
hive> show tables;
OK
Time taken: 0.518 seconds
hive> select * from departments;
FAILED: SemanticException [Error 10001]: Line 1:14 Table not found ‘departments’