Support Questions

Find answers, ask questions, and share your expertise

MYSQL ERROR : Mixed update/insert is not supported against the target database yet

Explorer

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

3 REPLIES 3

Mentor
@Rajan Babu Selvanamasivayam

What is your java and mysql versions?

You might have it a bug see this

Hope that helps

Explorer

Hi @Geoffrey Shelton Okot,

Below are the details.

MySQL version(from Hortonworks Sandbox):

-------------------------------------------------------------

19630-mysql-version.png

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

New Contributor

why don't you remove --driver option ?