Managing database sessions

Database sessions allow the developer to control how and when the data is committed to a database. This recipe shows how this is achieved in Talend.

Getting ready

Open the job jo_cook_ch07_0060_databaseSession. On inspection, you will see that the job has been set up to commit after each record has been written.

How to do it…

The steps to be performed are as follows:

  1. Run the job. You will see that it is very slowly adding the records to the database.
  2. Kill the job. If you inspect the database table testSession, you will see that the records have been added to the database.
  3. Drag tMysqlConnection from the metadata panel and tMysqlCommit from the palette (note that this isn't available from the Repository panel) and wire up as ...

Get Talend Open Studio Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.