Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello !
I have this on a Talend job :
The aim is to fill the table with data, the table is just a relational one (2 fields which correspond to ID of other tables)
The tJava component allows me to print the query
It contains :
System.out.println(((String)globalMap.get("tMysqlOutput_27_QUERY")));
The tMySQLOutput component is set with "Insert or update on duplicate key or unique index".
The problem is that it gives me an SQL Syntax Error.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
With the tJava component, I get the query :
INSERT IGNORE INTO `myTable` (`myField_1`,`myField_2`) VALUES (36,12766) ON DUPLICATE KEY UPDATE
In facts, this query is invalid (using MySQL 5.7)
It works with "Insert or update" mode.
Then, is it a bug/mistake from Talend ?
Or do I have misunderstood the way of using "Insert or update on duplicate key or unique index" ?
Thank you for your answers !
Anth224