I have a text file that looks like this:
"CommonCode":"EI","IATA":"EI","ICAO":"EIN","CarrierName":"Aer Lingus"
"CommonCode":"AM","IATA":"AM","ICAO":"AMX","CarrierName":"Aeromexico"
I want it to look like this:
CommonCode | IATA | ICAO | CarrierName |
EI | EI | EIN | Aer Lingus |
AM | AM | AMX | Aeromexico |
I want it to create the column names dynamically from the text file as the column names will change and increase or decrease in number.
In R there appears to be a command called: “unsparsify” Which according to this post seems to do it.https://datascience.stackexchange.com/questions/55879/file-format-where-column-names-are-repeated-on-each-row
I can do it using a combination of AttributeSplitters, ListExploders, ListIndexers, AttributePivoters and AttributeExposers. But I can’t seem to get away from having to Explicitly input the Attribute names in the AttributeExposer and I need it to be dynamic.
Any ideas?