Sqoop hive import


when i use the following sqoop code,

sqoop import
–connect jdbc:mysql://nn01.itversity.com:3306/retail_db
–username retail_dba
–password itversity
–table orders
–hive-database hariharan_hive

it show the exception “dfs://nn01.itversity.com:8020/user/hariharanp1094/orders already exists”

but normally the hdfs hive file should be stored in /apps/hive/warehouse/hariharan_hive.db/ , then why it is showing this error…


@Hariharan_Palanicham Sqoop first imports the data to HDFS location and then loads the data into Hive table.

Remove Hadoop exists path

hadoop fs -rm -R /user/hariharanp1094/orders

And then sqoop query.


thanks a lot @annapurna