Passing SQL connection to custom node

Hi All,

I am writing a custom node that communicates with another application via a PostgreSQL database. Jobs are written to the database and monitored and after sometime a link to the results file is written by the other app. The idea is to pass the links to the jobs that have been run to the next node and read them in for further analysis.

Ideally I would like to do this the KNIME way and pass a connection to the database using the PostgreSQL connector node. Alternatively I could create a connection directly in my node. Unfortunately I am new to both KNIME and Java and could really do with an example of how to pick up and use the connection generated by the PostgreSQL connector node. Can anyone point me in the right direction? Either example code or good documentation would help.

Thanks for your help
Richard Jacob

1 Like

Hi @lostculture,

integrating with the database connection framework is not an easy task, especially if you are new to Java, you might be able to develop a solution to your problem purely using KNIME nodes and wrap them in a Component: https://docs.knime.com/2020-07/analytics_platform_components_guide/index.html

best,
Gabriel