replace empty cell with missing (?) globally in table

Hi @armingrudd!

not sure you got it but my first reply actually does solve it. In a loop and without Column Auto Type Cast Node :slight_smile:

Br,
Ivan

Hey @ipazin,
No I think I didn’t get it there clearly. Would you please provide the workflow instead of the image for the solutions?
As I understood, you filtered string columns to include for the loop and appended the rest of columns after the loop. Right? But I wanted to solve the problem in one loop without filtering and appending.
One thing I didn’t get at all is this part:

Would you please explain it?
Thanks.

Thank you @moritz.heine for taking the time and replying to us.
But I think I didn’t get the answer to my question. I was looking for a way to determine the column type automatically from the loop start like the other ones (currentColumnName and currentIteration ) and use it as a flow variable in other nodes (here column expression). Is it possible to add this feature to “Column List Loop Start” node to define the current column type as a flow variable?

Hi @armingrudd,

Sure. Workflow is attached. I usually don’t give people a workflow. Instead I give them explanation/idea how to do it and leave them to explore Knime and build their own workflow. I believe this is much more useful to them. If they have trouble making it I provide workflow.

Ok. Know I see. You wanted to do it without filtering and appending. Fine with me. Just I still think it is better to filter before the loop and append later on. Lets say for example you have 10 or more non string columns and more then 10 million rows. There is no need to go with all these cells in loop (Column Expressions node and possibly some other node) and converting them to string and later on outside of loop convert them again.

Remove filter node in my workflow, filter non string column in loop start node and then you will see that non string column is multiplied in your result (loop end node).

Column loop.knwf (25.6 KB)

Br,
Ivan

Yes, now I see what you are talking about. That’s because you used “toNull()” function. But I used this expression to find and convert empty cells: (This approach doesn’t make any faults on non string columns except as there is no flow variable for current column type, they will lose their original type and will become string)

if (length(column(variable("currentColumnName"))) == 0){
    missingValue();
}

And one more thing is that when you provided your solution, I thought there might be the same issue with non string columns, so I decided to find a general solution so that even if there was the same problem in non string columns, the solution solves it.
It’s really great for me to have such discussions with someone like you be cause I learn a lot.
Thanks. :heart_eyes::blush:

2 Likes

Ok. I’m glad. Helps me as well :slight_smile:
Br,
Ivan

Okay thank you for your feedback. I will redirect this feature request and we will discuss this internally.

Cheers,
Moritz

1 Like

Thanks for this Iris, this solved an unrelated problem for me.

Cheers/Evert

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.