I am trying to prepare my CCA175 exam. I am trying to import mysql database retail_db
to hive
but getting this error. I tried few times and also removed directories / files from these folders;
/user/hive/warehouse
/user/cloudera
Still, I am getting this following error, after running this sqoop
job:
sqoop import-all-tables \
--num-mappers 1 \
--connect "jdbc:mysql://quickstart.cloudera:3306/retail_db" \
--username=retail_dba \
--password=cloudera \
--hive-import \
--hive-overwrite \
--create-hive-table \
--compress \
--compression-codec org.apache.hadoop.io.compress.SnappyCodec \
--outdir java_files
Logging initialized using configuration in jar:file:/usr/jars/hive-common-1.1.0-cdh5.7.0.jar!/hive-log4j.properties FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. AlreadyExistsException(message:Table categories already exists)
Any help would be highly appreciated.
--verbose
in the end of your command and tell me the hive create table command generated before this error. Ideally it should remove Hive table as overwrite is used – Dev