Get column headers from within the file

Good day all,

I have a .txt file that looks like:

All the rows have the “header” info before the value.
e.g. Column Ordinal: 13 Expected Data Type: Date

Every row has the same info. (e.g. Column Ordinal, Expected Data Type, etc.)
I would like to have the values with their respective columns by getting the value using the : as a separator between header info and value.

I don’t know if this makes any sense, but let me know if you need any clarification as to the problem.


Hi philliperamos,

You can use mapKeys and mapValues function to extract the values from the file (the first mapper extracts the Keys, the second mapped extracts the Values), also make sure to unchecked the Columns header option in the CSV parser. Please see attached screenshot and pipeline. Hope this helps.

Regards, Jovan.JJ new pipeline 123_2019_11_06.slp (7.2 KB)

Thanks @jovan.j for the reply/suggestion. I’ll give it a try with my source file.