Add below code to get column header information. Once you get comma separated list of columns header just split this and save it in Enumeration. This is also dynamic in nature so number of columns can vary this will give you proper result.
1. var colHeader = activity.source.dataSourceConfig.sampleLines.line
2. var arrayCol = colHeader .split(',') ;
3. Use for loop to have values and save this in ENUM.
Here's my final code just as an full example, I'm not a "proper" coder so it might not be the prettiest and there are some "cleaning" possible and the columns had 2 values I didn't want to put in the enumerator, so I rather crudely omitted them with two if/else clauses... but anyway: