Search code examples
amazon-redshifttalend

Do I need to close connection in Talend?


I've started to play with Talend DI. I wrote a simple job to create a db connection then run a simple query then write the output to a csv. Do I need to close the connection when the job is completed?

The database is redshift.

Thanks in advance


Solution

  • Talend advises that you should always close your database connection. Depending on your setup, a commit component might be used if you insert data which could automatically close the connection.

    But you seem to simply read data. In this case I would try out the following:

    • Run the job a few times if possible
    • Execute the statement select * from stv_sessions; and have a look how many connections are open. If they are not closed automatically, you should close them. If the database / Talend automatically closes them when reading, you might reconsider.