Delete and reorder columns

How can I delete and reorder columns? I've tried using the JPython Script 1:1 and from what I can see I can only append columns with this node? Is this right?


The Jython 1:1 node has a checkbox in its main dialog panel, which should allow you to append the columns or create a table from scratch.

Besides the Jython node you can also use a setup of a splitter and a joiner node to move a set of columns to the end of a table (only as a workaround!). If you need to remove columns, you should use the column filter node.

We have a node in the works, which will allow an arbitrary resorting of the input columns. I'm not sure if it will make it into 2.0 (the node has been implemented, it "just" needs a careful review/documentation/testing).


Thanks Bernd,

My script works when I check the checkbox in Jython 1:1 (ie. the appropriate columns are appended to the input table), but when I uncheck the box (because I want to create a new table) I get the following error:

java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Cell count in row "2486055" is not equal to length of column names array: 18 vs. 9


Are you using the script template that comes as default setting with the Jython node? (The one where it says "AppendedColumnRow"?). Can you try to use "DefaultRow" instead? Maybe something like DefaultRow(row.getKey(), [newStringCell, newIntCell, newDoubleCell]).

If have not used this node, so it's a wild guess...

Yes!!! That worked! Thanks a lot!