Same column names in dat file

Hi,
I have pipe limited dat file. I am using csv parser to get columns. The dat file has same column name(description) more than once but value is different
eg-
id
name
company cd
description
job
description
department
description
orgunit
description
The issue is when i do csv parser and preview data, i get description column only once (which is first in place that is after company cd) . The description column after department and org unit does not appear while doing preview. Can you help here. If i try to convert dat manually in csv(pipe delimited) , i get all columns but pipeline somehow skipping it.Please advise

Can anyone please help?

Same column name in a CSV will over write the previous key with same name, hence will retain the last column’s key and value only. CSV doesnt expect an Array.
If the number of columns are fix, you can do the following

  1. Use Skip Lines = 1 (skips Header row)
  2. Uncheck Contains Header
  3. Added the Column Names this time with some difference in the column names:
    Example: ID, Name, Company CD, CompDescription, Job, JobDescription, Department, DeptDescription, OrgUnit, OUDescriptin

the Names within an object should be unique so you can clearly identify them. If they can repeat then they need to be an Array or array of objects

1 Like

Thanks . It worked