Text file partitioning

I have been trying to partition a file using an identiifer within the file to identify break points, what I would like to do is us the Sample ID (see rough outline below) as the partition point and move everything until the next Sample ID line into a new table for processing.  I can use Rule-based Row filter and GroupBy to generate a list of Sample IDs its the loop method to partition the file that is escaping me.

File format

Sample ID: 00001

some lines of text......

Sample ID: 00002

some lines of text.......

Sample ID: 00003

some lines of text.......


Thanks for any help and your time


Hi AndyS,

so I would do the following

1. Identify the "subparts"

Use a Rule Engine node to generate a column with is the sampeID (if sample ID is in column1 ) and otherwise a missing value

Use the Missing value with option previous on this newly generated column

2. group loop start

By grouping on this newly generated column, you get the sub parts of the table you wanted. This you can than write to a table.

Does this help? If not, just upload the workflow to the point where you came and I will finnish it for you.

Cheers, Iris 

1 Like