Extract data from db using value from other db

Hi @chiashin , and welcome to the KNIME community.

Yes this is possible.

Here is a demonstration workflow that reads one database and then uses data from that to form an IN query to be used against a different database.

Querying database based on values from another database.knwf (52.0 KB)

In the above workflow, the creation of the delimited items for the IN query uses a component that I wrote specifically for this type of scenario, but this can also be achieved using a combination of GroupBy and String manipulation nodes, or possibly other methods (see the posts below for more info). I find it convenient to just use a component for it though :wink:

You may find the following forum topics useful as they discuss the creation of an IN clause, and other comma-delimited clauses for use against a database, providing different ideas and approaches:

2 Likes