DB Connection

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

 


Accepted Solutions
Eight 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


All Replies
Eight 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

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 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch