I am currently trying to work on multiple files using a List File node in a loop to work on each file individually.
All files have the same type and number of columns, but can differ by their column names.
For instance, file 1 has columns 'structure' and 'name' wile file 2 has columns 'STRUCTURE' and 'id'.
My problem is that I have to configure manually the following nodes between each iteration because of the change of column name, so I thought using column indices instead would be a good idea...
Does anyone know if there is a simple way to identify a column by its index rather by its name, for instance Col(1), like the variable ROWINDEX?
Here is a simplified idea of the workflow I am currently trying to build:
List File -> Tablerow to loop -> SDF Reader -> String Manipulation on second column -> Loop End
Probably the Insert Column Header can solve your problem without accessing the columns by their index. That way you can create a consistent table header for each intermediate column in the loop.
Good point Aborg, that reminds me, in fact the "extract column header " node will generate some default column index for you, that should deliver exactly as needed.
In the end, I simply used a Python Snippet, since I am not very confortable in java... (the corresponding workflow part is attached).
I also tried to use the Insert Column Header node, but I couldn't make it work, since there were actually some files that had more columns than others and it seems each column has to be defined in the second input table.