Scenario: Writing a row to a table in the MySQL database via an ODBC connection - 6.1

Talend Components Reference Guide

Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Open Studio for Data Quality
Talend Open Studio for ESB
Talend Open Studio for MDM
Talend Real-Time Big Data Platform
Data Governance
Data Quality and Preparation
Design and Development
Talend Studio

This scenario clears the data in a table of a MySQL database first and then adds a row to it.

The table, named Date, contains one column called date with the type being date.


As a prerequisite of this Job, the MySQL ODBC driver must have been installed and the corresponding ODBC connection must have been configured.

  1. Drop tDBOutput and tRowGenerator from the Palette to the design workspace.

  2. Connect the components using a Row > Main link.

  3. Double-click tRowGenerator to open its Schema editor.

  4. Click the [+] button to add a line.

    Enter date as the column name.

    Select Date from the data type list.

    Select getCurrentDate from the Functions list.

    Enter 1 in the Number of Rows for RowGenerator field as only one row will be added to the table.

    Click OK to close the editor and propagate the schema changes to tDBOutput subsequently.

  5. Double-click tDBOutput to open its Basic settings view in the Component tab.

  6. In the Database field, enter the name of the data source defined during the configuration of the MySql ODBC connection.

    To configure an ODBC connection, click to open the database connection configuration wizard.

  7. In the Username and Password fields, enter the database authentication credentials.

  8. In the Table field, enter the table name, Date in this example.

  9. In the Action on data field, select Insert to insert a line to the table.

  10. Select the check box Clear data in table to clear the table before the insertion.

  11. Save the Job and press F6 to run.

    As shown above, the table now has only one line about the current date and time.