Six Stars

DB Connection

Hi Team

In Talend general we use connection components to reuse the connection and we use close component to close the established  connection.

 

Is it Mandatory to use close component,or will the connection close automatically one job ends.

Please clarify

 

Thanks

Deepthi

 

1 ACCEPTED SOLUTION

Accepted Solutions
Six Stars

Re: DB Connection

Hi Deepthi,

 

Your connection will be closed, and all resources released when the job completes, so assuming your job doesn't run continuously without exiting, there's no need to explicitly close the connection.

 

The close connection components are really just for closing connections during a job, which you may want to do for a number of reasons, including:

 

You might open multiple database connections optionally depending on the logic in your job, potentially even for each row in a flow, and in this case you'll likely want to close these connections as soon as you're finished with them.

 

For long/perpetually running jobs, like ESB jobs, a permanent connection to the database may not be practical, in which case establishing a connection and closing it when you're finished will be necessary.

 

Regards,

 

 

Chris

2 REPLIES
Six Stars

Re: DB Connection

Hi Deepthi,

 

Your connection will be closed, and all resources released when the job completes, so assuming your job doesn't run continuously without exiting, there's no need to explicitly close the connection.

 

The close connection components are really just for closing connections during a job, which you may want to do for a number of reasons, including:

 

You might open multiple database connections optionally depending on the logic in your job, potentially even for each row in a flow, and in this case you'll likely want to close these connections as soon as you're finished with them.

 

For long/perpetually running jobs, like ESB jobs, a permanent connection to the database may not be practical, in which case establishing a connection and closing it when you're finished will be necessary.

 

Regards,

 

 

Chris

Six Stars

Re: DB Connection

Hi Chris

 

Thanks for your clarification.

Here i have a question Lets say my iterates for 10 times and i have used connection component in the job and i didnt use close component what happens here, will the job run on single connection on new connection establishes for every iteration?

Thanks

Deepthi