How do I examine the data of an input table from within the configure(final DataTableSpec[] inSpecs) routine?
I am trying to verify that the rows of names in the first input table match the column header names in the second input table. But I can think of several other reasons why I might want to check the table data before running the execute() routine:
- It may be illegal to run a node against an empty table so I would want the configure() routine to check how many rows the input table had; or
- I might want to add a new column to the output for every row in the input table, so I would need to know how many rows the input table had in order for the configure() routine to create the output DataTableSpec.
If these scenarios need to be handled in the execute() routine, then how do I correctly create the outputTableSpec in advance?
Note that I checked the source code for the Transpose Node as it must need to know how many rows are in the input table in advance in order to define the output DataTableSpec. But the Transpose Node configure() routine only has a single line of code:
protected DataTableSpec[] configure(final DataTableSpec[] inSpecs) throws InvalidSettingsException { return new DataTableSpec[1]; }