Six Stars

tMySql Configuration

Morning All,

 

How to set tMysqloutput component to have:

1 - A specific collation to the table for exemple "Utf8_general_ci" which is different to the default collation of the data base.

2 - A specific collation to a column for exemple "Utf8_bin"

3 - To have some column like Foreign Key

 

And in other side, is it better to create first tables and use tMysqloutput component to insert rows or it is the same thing to use tMySqloutput to create and insert rows.

 

Thanks,

 

 

  • Data Integration
  • Talend Integration Cloud
2 REPLIES
Nine Stars

Re: tMySql Configuration

You can manage session parameters by JDBC advanced settings - 

useUnicode=true&characterEncoding=utf-8

 

in simple cases - You can use tMySQL component for create table, but generally - more proper do it manually.

 

You can do it outside Talend, or use construction like:

CREATE TABLE IF NOT EXISTS tbl_name
(

);

in tMySQLRow component

 

the benefits of this, full control of process, like:

  • add indexes (not only PK)
  • constraints
  • collations
  • ... list could be continue
-----------
Six Stars

Re: tMySql Configuration

Morning vapukov,

 

Thank you for your message, it is helpful.

By your advice to manage session parameter by JDBC advanced settings, i can understand with code bellow

useUnicode=true&characterEncoding=utf-8

That i set character encoding to Utf8; but nothing tell me that the collation is setting in Utf8_general_ci 

 

Thank you for reply,