I need to transfer data from Hive to MySQL.
Here is my sqoop command:
jdbc:mysql://mysqlserver --username username --password password --table test --columns "member_id,answer_id,answerer_id" -m 1 --export-dir /user/hive/warehouse/utils.db/test --input-fields-terminated-by \001 --lines-terminated-by \n --update-mode allowinsert
But every time I run this command, the data seems to be added to the table, but do not overwrite the table.
So, is there a way that I can automatically trim the MySQL table when running this sqoop command?
source
share