I would like to modify multiple columns within a table using a Java Snippet node. Adding all those columns as input and output variables is very tedious, so I would like to process them dynamically.
String stringVale = getCell(0, tString);
... I can get a cell's value. However there seems to be no equivalent method for setting a string's value back to a cell. Is there any other approach or am I overlooking anything?
Sorry, there is no such possibility. We can dynamically access any input data but the output (meta-)data needs to be set up-front during configuration. It's a pending feature request.
What may help is to return your data into an array output column that you later split?
Just an idea, maybe it would help if you unpivoted the table before the Java Snippet ? This way your multiple input columns become a set of 2 input columns (one for the variable name, another for the value) and that way you don't need to manage columns in Java but only rows, which makes it sort of dynamic. In your Java code, of course, you would need to provide for the various value cases ...
very helpful suggestions, I'll see what works best.