A site about Talend
Talend provides a number of t[DB]Connection components, for establising connections to supported database vendors.
Our examples will be based on MySQL; but referring to other database vendors if helpful. The principles learned here, can be applied to all of the database vendors that Talend supports.
Talend provides the tMysqlConnection component, for establishing a connection to a MySQL database. Although other components such as tMysqlInput and tMysqlOutput are able to establish a connection themselves, it is sensible to always delegate their connection to a database connection component. This reduces the configuration and maintenance of the many database components that you may use in your Jobs. To take this a step further, you should then look to wrap-up your connections and connection parameters in to reusable and configurable Jobs, as described in our Talend Database Tutorial.
It is possible to specify a database connection as being shared. That is, other database connection components may share the connection. At first, the purpose of this may not seem clear; however, establishing a shared connection allows parent, child and sibling Jobs to reference the same connection.
There are some limitation to the use of shared connections.
By default, data will not be Committed to your database, unless you use a t[DB]]Commit component such as tMysqlCommit. You can alter this behaviour by checking Auto Commit, which can be found on the Advanced settings tab. This means that components such as tMysqlOutput will have their data committed every Number of rows per insert. This value can be found on the Advanced settings tab of t[DB]Output components.
Read our tutorial Working with Databases, to get a good understanding of how this family of database connection components are used.
The following is a sample screenshot shows a simple usage of this component.
comments powered by Disqus