cancel
Showing results for 
Search instead for 
Did you mean: 

Same column names in dat file

hina_walia
New Contributor

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

3 REPLIES 3

hina_walia
New Contributor

Can anyone please help?

Kulashekharan
New Contributor II

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

Thanks . It worked