Four 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

  • Data Integration
1 ACCEPTED SOLUTION

Accepted Solutions
Nine 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.
5 REPLIES
Nine 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.
Four 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?

 

 

Nine 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.
Four 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

Four 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