Hive database error

Hi I have imported all tables from retail_db in avro format into hive database sqoop_import_ubuntuaws_avro but when I try to use this database in hive I am getting the below error- Does anyone know what could be probably going wrong?

did you create the DB before sqoop import. If not please create it and then mention the DB name in the sqoop import as --hive-database <DB_NAME>

When you import using --target-dir or warehouse-dir, it will create the folder in hdfs. It will not create the data base in Hive. So when you do -ls you will see all tables as dir in hdfs under Hive default dir.
You need to go to Hive and create the database of the name you have imported table to.

1 Like