Sqoop not creating hive tables in import all tables

Hi All,

I am running below Sqoop import command and i see no tables getting creating in Hive under retail_stage.db. all the data files and folders are created. Please help and let me know if more details required.

sqoop import-all-tables
-m 1
–connect “jdbc:mysql://quickstart.cloudera:3306/retail_db”
–username=retail_dba
–password=cloudera
–create-hive-table
–as-avrodatafile
–warehouse-dir /user/hive/warehouse/retail_stage.db

@Yatishbn,hive-import is missing

1 Like

sqoop import-all-tables -connect jdbc:mysql://$HOSTNAME/retail_db -username retail_dba -password cloudera -create-hive-table -hive-import --warehouse-dir ‘/user/hive/warehouse/sqoop_import.db’ -hive-database sqoop_import , this should create the tables

Even with -hive-import, it is not creating the hive tables. May due to the format of hive files i am trying to create hive file in AVRO. let me know your thoughts

Use below arguments
–hive-import
–hive-databse retail_stage
–as-avrodatafile
And remove warehouse-dir.

Hi!
Im trying to use compress in Hive by creating tables in hive using sqoop. But receiving an error. can please check the screenshot and explain me why this issue had raised and troubleshoot it.

Thank You
Bharadwaj

@Bharadwaj - Below folder is already available.
hdfs://nn01.itversity.com:8020/user/bvandara/categories

Please use below command to remove the directory.
hadoop fs-rm -R hdfs://nn01.itversity.com:8020/user/bvandara/categories

1 Like