Forum Discussion

aanchalrajpal's avatar
aanchalrajpal
New Contributor
8 years ago

How to use CSV Parser to read multiple records in single row

Hi,

I have a csv file ‘|’ separated which has records like below.

123456|61|eng |01|aabc|test|16|Long|,|01|aabc|test1|Regular|Short||
112569|61|eng |01|vfbc|test3|16|XL|

how to read both records as 1st record has 2 details in a single row separated by comma. CSV parser is giving below error-

“The CSV record has more columns than data, Resolution: Please provide valid CSV data at line 7 or route it to the error view”

please suggest

6 Replies

    • aanchalrajpal's avatar
      aanchalrajpal
      New Contributor

      Hi,

      Thanks for providing the solution, the pipeline solves the concern of splitting a record of csv however my csv also has a single line record and the pipeline shared by you its giving error when trying to execute with that file.I have attached source file, kindly help in getting it resolved.

      sample.txt (155 Bytes)

      Error:
      Failure: Error parsing at line 2, Reason: Cannot complete CSV data parsing, Resolution: Please provide valid CSV data at line 1 or route it to the error view

      • aanchalrajpal's avatar
        aanchalrajpal
        New Contributor

        Hi,

        Can anyone help on it , I need it badly to solve my pending issue.