replace " yes " by 1 and " no " by 0 multiples columns in knime

Hi there @Ranalytics,

considering you have 385 columns it should take some time as in each iteration one column is processed. To speed up your KNIME you can always assign more memory to it. (Check this blog on how to do that and other optimization tips&tricks - blog is a bit older but still lot of points valid.)

Regarding solution with loop you currently have I would use another one. And that is Unpivoting node to have all columns that need replacement in one column. Then you don’t need loop as one Rule Engine covers it all. After replacement use Pivoting to obtain original data structure. Should be much faster than using loop but also considering your table properties won’t be finished in 2 seconds obviously.

Here is example workflow which you can download and check:


Additionally there is ticket (Internal reference: AP-13315) to create node which would allow search and replace functionality over multiple columns. Will add +1.

Hope this helps!

Br,
Ivan

4 Likes