Skip to main content Skip to complementary content

Closing a database connection created by a tMysqlConnection component

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

tMysqlCommit/tMysqlRollback

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.

tMysqlClose

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).

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!