The tMysqlConnection is used to create a MySQL connection that will be used by other MySQL components, such as tMysqlnput or tMysqlOutput. In a Job, the tMysqlConnection does not close the connection and should be used with:
- tMysqlCommit/tMysqlRollback components
- a tMysqlClose component
You can use the option Close Connection in the tMysqlCommit/tMysqlRollback components to close the connection.
The tMysqlConnection component creates a connection, the tMysqlCommit commits the changes if the subJob works fine and closes the connection, while the tMysqlRollback rolls back the changes if the subJob fails and closes the connection.
You can use the tMysqlClose to close a MySQL connection if there is no tMysqlCommit/tMysqlRollback in the Job or if the Close Connection check box is not selected in the tMyslqCommit/tMysqlRollback.
For an example on using the tMysqlClose component, see Scenario: Reading data from databases through context-based dynamic connections.
For an example on using the tMysqlClose component, see Scenario: Reading data from databases through context-based dynamic connections on Talend Help Center (https://help.talend.com).