Hello there,
I am super new to Knime. I have following table:
Destination, Dispatcher, NumberOfEvents, Price
Germany, D1, 15, 150.0
Germany, D5, 20, 200.0
Germany, DWrong, 20, 200.0
Spain, D1, 5, 50.0
Spain, D4, 15, 150.0
when there is an entry with Dispatcher equals DWrong, I would also like to create another entry with Dispatcher equals “Error” (and the other values same as “DWrong”). E.g.:
Germany, Error, 20, 200.0
But the entry should be created only when the NumberOfEvents in “DWrong” is bigger than 1% of the total NumberOfEvents for that same Destination.
The pseudo code would be something like this:
loop (Destination) // Germany, Spain
{
loop () {
TotalNumberOfEvents += NumberOfEvents;
}
loop () {
if (Dispatcher == "DWrong") {
if (NumberOfEvents > (TotalNumberOfEvents * 0.01) ) {
addRow(Destinaction, "Error", NumberOfEvents, Price);
}
}
}
}
How can I do something like this with Knime ?
Thanks in advance,