Hi. I've got a mapping problem that I can't seem to figure out. Any help is appreciated.

I've got a CSV file with 50 fields in it. The problem is that I want to append additional files to it using Kettle with a dynamic subset of those 50 fields, and I want the appended fields to be in the correct location.

For example, let's say the appended file may have fields 1-5 and 40-50 populated with no empty fields in between. The appended file will have a header row with the field names that match the original file's field names albeit a subset of the fieldnames.

The append should work so that the appended field is placed in the correct location of the original file, thus in this example, the mapping would match up fields 1-5, place 35 commas and then match up fields 40-50 for the row.

I was thinking a javascript transformation is the only possibility. If someone else can suggest something else I would appreciate it.