Created on
07-30-2017
04:35 AM
- last edited on
11-23-2019
10:52 PM
by
ask_bill_brooks
Hi aLL ,
I am getting the below error while performing an upsert function in mysql via Sqoop export.
Sqoop command:
sqoop export --options-file /root/sqoop_test/sqoop_options.txt --table lr_hive --export-dir /user/root/lr/lr_export -m 2 --update-key revw_id --update-mode allowinsert --batch --outdir javafiles --driver com.mysql.jdbc.Driver --input-null-string 'ddfddf';
options file contents:
--connect jdbc:mysql://sandbox.hortonworks.com:3306/Loan_Review --username root
primary key is available in the target database.
Questions:
1. Is there anything wrong with my above code?
2. Does it require any configuration/operational change in mysql db?
Log file attached. log-file-sqoop-export-error.txt Appreciate any help in advance.
Regards,
Rajan Babu S
Created 07-30-2017 06:22 AM
What is your java and mysql versions?
You might have it a bug see this
Hope that helps
Created on 07-30-2017 09:44 PM - edited 08-17-2019 10:26 PM
Below are the details.
MySQL version(from Hortonworks Sandbox):
-------------------------------------------------------------
Java Version:
--------------------
[root@sandbox sqoop_test]# java -version java version "1.7.0_95" OpenJDK Runtime Environment (rhel-2.6.4.0.el6_7-x86_64 u95-b00) OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)
Question:
1. You mentioned about a patch update. I am a new bee and I have no clue to apply the patch. Could you please help here
Regards,
Rajan
Created 11-23-2019 08:19 PM
why don't you remove --driver option ?