Four Stars

tMySqlOutput use case

Morning All,

I use tMySqlOutput to creat a new table and insert also records.

My primary Key column is VARCHAR type and everything is OK

But only one problem i get; Talend detect  these 2 lines (PK) like the same thing

  • ANAELLE.GUERIN
  • ANAËLLE.GUERIN

So i get this error:

tMysqlOutput_1 - Duplicate entry 'ANAËLLE.GUERIN' for key 'PRIMARY'
Duplicate entry 'Céline.PHILIPPON.ERANOVE' for key 'PRIMARY'

I have already try this both collation utf8-general-ci and ut8-unicode-ci but nothing.

 

Thank you help,

  • Talend Integration Cloud
1 ACCEPTED SOLUTION

Accepted Solutions
Nine Stars

Re: tMySqlOutput use case

it is not a Talend issue, this is relate to MySQL and it's support of UTF (and error text - not from Talend, but from MySQL)

 

so, the proper place for search the answer - database related forums

as, example - https://stackoverflow.com/questions/6466901/mysql-distinction-between-e-and-é-e-acute-unique-index

 

VARCHAR is always not best idea as Primary Key, but 

try as suggested use UTF8_bin

 

https://dev.mysql.com/doc/refman/5.7/en/charset-unicode-sets.html

To further illustrate, the following equalities hold in both utf8_general_ci and utf8_unicode_ci (for the effect of this in comparisons or searches, see Section 10.1.8.6, “Examples of the Effect of Collation”):

Ä = A
Ö = O
Ü = U
A difference between the collations is that this is true for utf8_general_ci:

ß = s
Whereas this is true for utf8_unicode_ci, which supports the German DIN-1 ordering (also known as dictionary order):

ß = ss
-----------
4 REPLIES
Nine Stars TRF
Nine Stars

Re: tMySqlOutput use case

Depending on the character set you have choosen for the database, you may try to create the column using:

yourColumnName varchar(80) collate utf8_bin

 


TRF
Nine Stars

Re: tMySqlOutput use case

it is not a Talend issue, this is relate to MySQL and it's support of UTF (and error text - not from Talend, but from MySQL)

 

so, the proper place for search the answer - database related forums

as, example - https://stackoverflow.com/questions/6466901/mysql-distinction-between-e-and-é-e-acute-unique-index

 

VARCHAR is always not best idea as Primary Key, but 

try as suggested use UTF8_bin

 

https://dev.mysql.com/doc/refman/5.7/en/charset-unicode-sets.html

To further illustrate, the following equalities hold in both utf8_general_ci and utf8_unicode_ci (for the effect of this in comparisons or searches, see Section 10.1.8.6, “Examples of the Effect of Collation”):

Ä = A
Ö = O
Ü = U
A difference between the collations is that this is true for utf8_general_ci:

ß = s
Whereas this is true for utf8_unicode_ci, which supports the German DIN-1 ordering (also known as dictionary order):

ß = ss
-----------
Four Stars

Re: tMySqlOutput use case

Hello,

Thank all for help, i test it and let you know

Four Stars

Re: tMySqlOutput use case

Hello All,

Thank you very much, Set Column as Utf8_bin solve my problem

Thanks,