Talend - tmysqlcommit with tmysqloutput - error

Five Stars

Talend - tmysqlcommit with tmysqloutput - error

Hi,

I have a talend job, with the following sequence

 

tmssqlinput --> tmap --> tmysqloutput |onsubjobok tmssqlrow

 

I do want the autocommit option in tmysqloutput. I want to use the tmysqlcommit, but how should I used it? I have already determined the connection details in tmysqloutput.

 

If I connect tmysqloutput to tmysqlcommit, I get an error in the 'Component list' of tmysqloutput. It is expecting a value there and its drop down with no values in it

 

How do I use tmysqlcommit in this scenario?

 

Thanks in advance Rathi


Accepted Solutions
Ten Stars

Re: Talend - tmysqlcommit with tmysqloutput - error

I typically make it the first component to execute by connecting it to the rest of the job with an OnSubJobOK connection, but I'm lazy. Probably the best practice is to connect a tPrejob component (OnComponentOK) to tMysqlConnection. Then connect a tPostjob component to tMysqlClose. This will ensure that your connection is established before the rest of the job runs and that it is closed, even if the main job experiences an exception.

View solution in original post


All Replies
Ten Stars

Re: Talend - tmysqlcommit with tmysqloutput - error

Configure a tMysqlConnection component with your connection details. For your input, output and commit components, check "Use an existing connection" and select your tMysqlConnection from the dropdown list that appears.
Highlighted
Five Stars

Re: Talend - tmysqlcommit with tmysqloutput - error

Thanks cterenzi.

 

So, will the tmysqlconnection remain floating in the design and would not be connected to any other component?

 

 

Ten Stars

Re: Talend - tmysqlcommit with tmysqloutput - error

I typically make it the first component to execute by connecting it to the rest of the job with an OnSubJobOK connection, but I'm lazy. Probably the best practice is to connect a tPrejob component (OnComponentOK) to tMysqlConnection. Then connect a tPostjob component to tMysqlClose. This will ensure that your connection is established before the rest of the job runs and that it is closed, even if the main job experiences an exception.

View solution in original post

Five Stars

Re: Talend - tmysqlcommit with tmysqloutput - error

Hi citerenzi,

 

Thanks for the explanation, that is one complete solution!!

 

However, I have 20 - 25 jobs running in parallel and each job is similar to the job I have described in the main topic. 

 

So, for each of these parallel jobs, should I open and close the connection to mysql? Will this cause any issue in mysql?

 

Thanks

Rathi

Five Stars

Re: Talend - tmysqlcommit with tmysqloutput - error

Hi, 

 

I guess I will start the above comment as a separate discussion.

 

The answer to this topic was given and has been accepted as solution

 

Thanks

Rathi

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog