Is it possible to have a SQL script from a Knime workflow?

Hi,

I have a knime workflow where I insert some data into an Oracle DB. The data comes from a Table Creator and have the number of columns and format suitable to the table in question, so I can have a DB Writer to persist it. That is very simple and works fine.

The question is, is it possible to have a sql script generated from that workflow? I need to have this flow replicated in other schemas or DBs and used by teams that does not have access to Knime directly.

The example workflow is depicted below, and is also available as an attachment.

Thanks in advance.

image

SQL Test.knwf (11.3 KB)

Hi @gcfleury

it is not possible to convert this.
However, we are logging the SQL we are executing in the database in the KNIME log file. So it should be possible to get the SQL the DB Writer used by extracting it from the log.

Best, Iris

1 Like

Hi Iris,

Thank you for the explanation!

Some SQL databases offer you the possibility to see some or all of their structure and extract that. In Hive that is

SHOW CREATE TABLE mytable;

For ORACLE there is the suggestion to use the dbms_metadata to get the information

You might try to combine the approach with KNIME workflows and extract the SQL statemens.

1 Like

mlauber71,

Thank you.

Did you try the “DB Query Extractor” node?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.