In Talend Open Studio, an output component like tMySqlOutput is based on a target schema. tMyqlOutput can be set to create a table on-the-fly if one doesn't exist: actions "Create table" and "Create table if not exists". The DDL generated by Talend to create the table is based on settings in the Schema window. Although the Schema window allows vendor-specific data types and NOT NULL settings, it doesn't allow for MySQL features like AUTO_INCREMENT and UNIQUE.
This schema is displayed when the "Edit schema" button is pressed on the Basic settings tab of tMySqlOutput. It was created from an input source. This window enables you to set the type (Java and MySQL), a NOT NULL flag, a DEFAULT value, and a COMMENT. However, there is no checkbox for AUTO_INCREMENT or UNIQUE.
The "Advanced settings" tab of the component gives you this additional control. A full column type specification -- including modifiers like AUTO_INCREMENT -- can be added. To view the additional columns table, make sure that a DDL-creating action like "Create" is set.
|Advanced Settings Tab|
Here is a screenshot of MySQL Workbench showing the result of running the TOS job.
|MySQL Workbench Showing Result of Run|
UPDATE: When working with this technique, I noticed that syntax errors sometimes occur. This is shown in the error dialog that displays during an aborted run. To fix this, delete the special AUTO_INCREMENT or other column from the "Advanced settings" tab and re-create it (identically).