Skip to content
KNIME Documentation
Main Navigation Get startedBuildWork with KnimeAccount and adminRelease notesDeveloper tools
Community Hub
DevelopersKnime
Sidebar Navigation

Getting Started

Installation

User Guide

Release Notes

Install Extensions

Building Workflows

Components

Flow Control

Expressions

File Handling

Deployment

Integrated Deployment

Workflow Invocation

Best Practices

Advanced Features

AI Extension

Get Started

Build an Agent

Inject context with RAG

LLM Providers

Tutorials

Summarize product reviews

Product FAQ assistant

Restaurant agent

Your first local agent

Task extractor

Reporting

Kerberos

Extensions

Database

Overview

Tutorials

Read and filter data from a database

Write a transformed dataset to a database

Concepts

Ports and Sessions

Query Generation

Type Mapping

Deprecated Framework

Connecting

Connect: Dedicated Node

Connect: File-Based Database

Connect: Generic DB Connector

Register a JDBC Driver

Install Third-Party Driver Plug-in

Drivers on Hub and Server

Kerberos Constrained Delegation

Reading and Transforming

Read Data

Transform Data Visually

Run a Custom SQL Query

Parameterize a Query

Writing and Modifying

Insert, Update, or Merge

Delete Rows

Bulk Load Data

Create and Remove Tables

Use Transactions

Reference

Connector Node Settings

JDBC Driver Reference

Deprecated Node Mapping

Migrate Deprecated Workflows

Python

Overview

Tutorials

Python Scripting Quickstart

Data App Development Using Plotly

Data Processing

K-AI Scripting Assistant

Data Type Conversion

Batch Processing

Jupyter Integration

Environment Management

Pixi Configuration

Dependency Management

Environment Persistence

Channel Mirrors & Air-Gapped Setups

Conda Migration

Alternative Configurations

Conda and Miniforge Setup

Conda Environment Propagation

Manual Python Configuration

Legacy Node Migration

Concepts

Pixi Backend Architecture

Storage Logic

Python Environments on Executors

Reference

Python Scripting API

Bundled Packages

Executor and Hub Configuration

Troubleshooting Guide

API Reference

Inputs and outputs

Classes

Views

Utility functions

R

Deep Learning

Snowflake

Google Cloud

Azure

AWS

Big Data

Big Data Admin

Big Data Secured Cluster

Databricks

Microsoft Fabric

Power BI

Tableau

Report Designer

H2O

Changelogs

Version 5.12

Version 5.11

Version 5.10

Version 5.9

Version 5.8

Version 5.7

Version 5.6

Version 5.5

Version 5.3

Extensions

Port Scripts from Legacy Python Nodes ​

Before KNIME Analytics Platform v4.7, Python scripting used the KNIME Python Integration (legacy) with different node names, a different API, and a 1-based port numbering convention. This page explains how to migrate those scripts to the current Python Script and Python View nodes.

INFO

The current Python Script node was introduced as Python Script (Labs) in v4.5 and promoted to stable in v4.7. The main improvements are:

  • Significantly faster data transfer via Apache Arrow
  • A bundled Python environment — no setup needed to start
  • A unified API through the knime.scripting.io module
  • Support for both Pandas DataFrames and PyArrow Tables
  • Batch processing for datasets larger than RAM

Quick adapter ​

Add the following three lines to the top and bottom of your legacy script to make it work in the current Python Script node:

python
import knime.scripting.io as knio

# Add at the top — replaces `input_table_1`
input_table_1 = knio.input_tables[0].to_pandas()

# ... your original legacy script goes here unchanged ...

# Add at the bottom — replaces `output_table_1`
knio.output_tables[0] = knio.Table.from_pandas(output_table_1)

Port numbering change ​

0-based vs. 1-based port indexing

The legacy nodes used 1-based port numbering (e.g. input_table_1, input_table_2), while the current nodes use 0-based indexing (e.g. knio.input_tables[0], knio.input_tables[1]). Update all your port references when migrating.

LegacyCurrent
input_table_1knio.input_tables[0].to_pandas()
input_table_2knio.input_tables[1].to_pandas()
output_table_1knio.output_tables[0] = knio.Table.from_pandas(df)
flow_variables['x']knio.flow_variables['x'] (unchanged)

knime package name clash ​

If the package knime is installed via pip in your environment, importing knime.scripting.io will fail with:

No module named 'knime.scripting'; 'knime' is not a package

Run pip uninstall knime to remove the conflicting package. The knime.scripting.io module is provided automatically by KNIME via the PYTHONPATH — it does not need to be installed.

Next steps ​

  • Python Scripting API
  • Quickstart tutorial
Pager
Previous pageManual Python Configuration
Next pagePixi Backend Architecture