0 ×

Create Variables

KNIME Base Nodes version 4.4.0.v202104271111 by KNIME AG, Zurich, Switzerland

This node allows creating flow variables of different types. A default value must be specified for every defined variable.
Note: The variables defined by this node take precedence over upstream ones (on the Variable Inport). Thus upstream variables will get overridden by defined variables with the same name and type. The node will issue a warning in the case this happens.
It is possible to define variables with the same name but different types but this will probably lead to unexpected behavior downstream and should be avoided.

Options

Add
This button can be used to define a new variable.
Type
This is the type of the variable to create. Depending on the type the requirements for the default value may change.
The following five basic data types are supported:
  • String. A string of characters. This is the default if a new variable is created.
    Note: The node will issue a warning if the string is empty or does only contain spaces.
  • Integer. An integer number with possible values from 2³¹-1 to -2³¹. The value must be a valid number (consisting only of an optional sign (“+”/“-”) and “0”-“9”) and be in the range above.
    If the size of your value exceeds the limits above, you can try to use a Long or Double value instead.
  • Long. An integer number with possible values from 2⁶ª-1 to -2⁶ª. The value must be a valid number (consisting only of an optional sign (“+”/“-”) and “0”-“9”) and be in the range above.
    If the size of your value exceeds the limits above, you can try to use a Double value instead.
  • Double. A floating point decimal number with possible values from around 4.9·10⁻³²⁴ to 1.8·10³⁰⁸ in both the positive and negative range.
    The value must be a valid number (consisting only of an optional sign (“+”/“-”) and “0”-“9”). You can specify an exponent by appending “e” followed by the exponent. Apart from a numeric value you can also specify one of the following three (case-sensitive) special values: Infinity for positive infinity, -Infinity for negative infinity and NaN for “Not a Number”.
    If the number is too big or too small, it may be converted into one of the these special values. (You will be warned if this happens).
    You should keep in mind that you may loose some precision for big values or values that are very close to zero.
  • Boolean. A truth value that can be either “true” or “false”.
    Note: Any other value will be interpreted as “false”.
Variable Name
This is the name of the variable. You can use any characters to define your name. However, a name must not be empty or be used by other variables you have already defined in the node (regardless of the variable type).
Value
The value of the variable. It must comply with the limitations of the type described above.
Move/Remove variable
You can change the order of your variables by using the arrow buttons at the end of the row.
If you wish to delete a variable definition, you can use the button with the bin icon next to the move buttons.

Output Ports

Icon
Created flow variables

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.