Is it possible to return multiple rows of output for a single row of input in a java snippet?
I am using a java snippet to parse a file.
The input contains a file name per row, each file contains multiple sets of data, each set contains many rows in column deliminated form. The number of sets in the file is unknown at the start. The following is an example.
7744|12/29|14:59:52|B|2475||JT|200|A|2478||JT|200||
7744|12/29|14:59:51|B|2475||JT|210|A|2478||JT|200||
7744|12/29|14:59:50|B|2475||JT|190|A|2478||JT|200||
5645|12/29|14:59:52|B|2475||JT|500|A|2478||JT|200||
5645|12/29|14:59:51|B|2475||JT|600|A|2478||JT|200||
5645|12/29|14:59:50|B|2475||JT|610|A|2478||JT|200||
3433|12/29|14:59:52|B|2475||JT|1200|A|2478||JT|200||
I would like to return the data for 7744, 5645, 3433 in the example above as separate rows of output, each row containing lists of the separate entries, so the output table would look like
7443, [12/29, 12/29, 12/29], [14:59:52, 14:59:51, 14:59:50], [B,B,B], [JT,JT,JT], [200,210,190], ...
5645, [12/29, 12/29, 12/29], [14:59:52, 14:59:51, 14:59:50], [B,B,B], [JT,JT,JT], [500,600,610], ...
3433, [12/29, 12/29, 12/29], [14:59:52], [B], [JT], [1200], ...
[] are lists
is it possible to output multiple rows for each single row of input in a java snippet?
Alternatively, is it possible to return lists of lists? in which case I may be able to return
[7433, 5645, 3433], [[12/29, 12/29, 12/29], [12/29], [12/29], [12/29]], [[14:59:52, 14:59:51, 14:59:50], [14:59:52, 14:59:51, 14:59:50], [14:59:52]], ....
and then use an ungroup node to re-create the multiple rows of output.
Best
David