Adding NULL value to row in KNIME

Viewed 4580

Does anyone know if it is possible to add a null value to a row in KNIME?

I am trying to use the Rule Engine to remove some values, and substitute them with a NULL.

Regards

4 Answers

Create a Dummy Null Column with a Rule Engine First and then use another rule engine to program what you need EG. $Example Column$ = "#" =>$Dummy Null" This will replace your # in the Example Column with Null Values

Hopes it helps

There is missingValue() function in Column Expressions node which returns missing value in a cell. Column Expressions node is based on JavaScript syntax so following logic is possible:

if(column("column1")=="someValue") //create missing
{ 
    missingValue()
} 
else //take value from colum1
{ 
    column("column1")
}

You can use a normal 'Java Snippet': Create the input and output via the lower menu. If you chose the 'replace' option for the output column you can replace the input values directly. Otherwise you have create a new column.

Here is example java code to paste and edit:

if(c_your_input>100)
{
    out_your_input = c_your_input;
}

If the there is no matching with if clauses missing values are automatically created.

Related