Icon

01_​Using_​Python_​Script_​in_​Databases

Working with databases with the Python Script (DB) node

This workflow demonstrates the usage of the Python Script (DB) node that allows you to access data from a database directly within your Python script. Using this node you can alter the data within a database row by row without the need to load all the data at once.

Notice, that the red connection ports of the database nodes only contain the SQL statement and connection information but not the data itself. The statement is processed within the database e.g. Oracle, MySQL, Postgres, DB2, SQL Server, Hive, Impala, etc. and the result is read into the KNIME Analytics Platform via the Database Connection Table Reader

Working with databases with the Python Script (DB) node This workflow demonstrates the usage of the Python Script (DB) node that allows you to access data from a database directly within your Python script. Using this node you can alter the data within a database row by row without the need to load all the data at once. Notice, that the red connection ports of the database nodes only contain the SQL statement and connection information but not the data itself. The statement is processed within the database e.g. Oracle, MySQL, Postgres, DB2, SQL Server, Hive, Impala, etc. and the result is read into the KNIME Analytics Platform via the Database Connection Table Reader node.
to be revised
Simple way to work with the result of a database query using the dataframe methods
Python Script (DB) (deprecated)
read the result into KNIME
DB Reader
This node demonstrates the usage of the different methods that you can use to access data within a database. Simply open the configuration dialog via the context menu and click on the Execute script button.
Python Script (DB) (deprecated)
Create Example Table

Nodes

Extensions

Links