cancel
Showing results for 
Search instead for 
Did you mean: 

Repeat Target Path/ Header Name in a csv file

cbot412
New Contributor

Hi,

My CSV has headers which repeat themselves - BLANK2 , BLANK2, BLANK2 , NAME, BLANK2

Mapper gives me error saying that I can’t have same Target Path names. I tried adding header fields to CSV formatter and Binary Header, that didn’t work. I tried adding .string() after the field name- didn’t work

I am thinking of a very convoluted way of doing this, but wondering if there is an easy fix that I am unaware of.

5 REPLIES 5

koryknick
Employee
Employee

@cbot412 - So the root of the confusion here is that JSON does not allow two elements in the same object level to have the same name. Since you want to do exactly that, then you will need to generate a custom header record and prepend that to your content. Take a look at this post for ideas on how you could do it.