is it, DB Query node can modify and read data. But, Parameterized DB Query Reader only supports reading ?
Hello @exploredata547,
there’s quite a difference between two nodes although both can be used (in theory) for same query.
DB Query node runs a query defined by the incoming DB table and result is new DB data table (brown port). You can follow it with a another DB node (Row/Column filter…) or use DB Reader node to read data into KNIME.
Parametrized DB Query Reader node same as DB Query has a query defined by incoming DB table but in addition it has (KNIME) data table input port which is used to restrict query by the possible values given in this list. Another difference is it return KNIME data table instead of DB port.
Which node to use depends on your use case. If you want to write custom SQL query you’ll use DB Query (or DB Query Reader if you don’t need DB data port) and if you want to use filters in your query where list of possible values is not in database (then it’s in KNIME as data table) you’ll go for Parametrized DB Query Reader node. You can look for workflow example to understand this better.
Regarding comment on modifying DB data, AFAIK both nodes (and other DB nodes with custom query option) should be able to “modify” (run other queries other than SELECT) before SELECT statement itself. You just have to write it properly which I find hard sometimes. For this purpose I usually go with DB SQL Executor node.
Hope this helps!
Br,
Ivan
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.