You can do this with a combination of keyGenerate (Surrogate key) followed by(branch/filter then join) and then Split.
You will branch and filter all header rows with their row position. You will then use a Agg tx with empty groupBy and use collect function to get all the header row indices as one row.
Join the header row indices(single row) with the full data as cross join.
Then use the information in the joined data to split into 3 streams.