Hub
Pricing About
NodeNode / Manipulator

Column Expressions (legacy)

KNIME LabsStreamable
Drag & drop
Like

This node provides the possibility to append an arbitrary number of columns or modify existing columns using expressions. For each column that shall be appended or modified a separate expression is defined. These expressions can be simply created using predefined functions similar to the Math Formula and String Manipulation Nodes. Nevertheless there is no restriction on the number of lines an expression has and the number of functions it uses. This allows the user to create their own complex expressions.
Additionally, intermediate results of functions or calculations can be stored within an expression by assigning them to variables (using '='). This allows results to be reused in different parts of the expression after they have been assigned (see Examples). Note: the names of these variables must be different from all of the names of the predefined functions. Otherwise an error will occur.
To add/remove an expression, the "+"/ "-" buttons respectively have to be used. To edit an expression for an output column, the expression has to be selected in the list of expressions and can be modified in the Expression Editor.
The created expressions are executed row-wise on the input data. Available flow variables and columns of the input table can be accessed via the provided access functions variable("variableName") and column("columnName"). Newly created columns are appended in the order they were defined (top to bottom) whereas replaced columns will remain at the original position of the input table. For each expression the last computed instruction will be returned.

The syntax and grammar of the expressions are based on the JavaScript Languange .

Examples:

  • 5*7+3

    will append a column with the value 38 for each row.

  • salary = column("salary")
    salary + salary*0.1

    will append a column with the values of the salary column of the input table increased by 10%.

  • "a1"
    "a2"

    will append a column with the value "a2" for each row, whereas

    a1 = "a1"
    a2 = "a2"
    a1

    will append a column with the value "a1" for each row.

  • and(column("age") < 26, not(column("student"))

    will append a column with true values for everyone under the age of 26 who is not a student, and false for every other person. In this case and(...) and not(...) are predefined functions provided by the Expression Editor.

Node details

Input ports
  1. Type: Table
    Any table
    Any input table. For each row the defined expressions will be computed and their results will be inserted to the specified column.
Output ports
  1. Type: Table
    Output table
    Output table.

Extension

The Column Expressions (legacy) node is part of this extension:

  1. Go to item

Related workflows & nodes

  1. Go to item
  2. Go to item
  3. Go to item

KNIME
Open for Innovation

KNIME AG
Talacker 50
8001 Zurich, Switzerland
  • Software
  • Getting started
  • Documentation
  • Courses + Certification
  • Solutions
  • KNIME Hub
  • KNIME Forum
  • Blog
  • Events
  • Partner
  • Developers
  • KNIME Home
  • Careers
  • Contact us
Download KNIME Analytics Platform Read more about KNIME Business Hub
© 2025 KNIME AG. All rights reserved.
  • Trademarks
  • Imprint
  • Privacy
  • Terms & Conditions
  • Data Processing Agreement
  • Credits