Troubleshooting CSV File Ingestion Error Through Datahub CLI

Original Slack Thread

Hello guys, I am trying to do CSV file ingestion through Datahub CLI. But I am getting below error:

Can someone please help?

your csv does not have column headers as described here: https://datahubproject.io/docs/generated/ingestion/sources/csv

i think you’re trying to ingest a generic csv file, but thats not the purpose of csv ingest

Okay. I want to ingest below sample data given on website. I tried copying that content into new excel file then saving it as a CSV file. And then tried to ingest it using CLI. But I am getting error. Is this the right way to ingest the CSV file?

it should be something in the file preventing the parser from reading it as a proper csv (it cannot find the resource column)
the code that reads the csv is here: https://github.com/datahub-project/datahub/blob/d36166f6d854c7c4e220e5f91a333327bd2e6024/metadata-ingestion/src/datahub/ingestion/source/csv_enricher.py#L613C1-L621C25|https://github.com/datahub-project/datahub/blob/d36166f6d854c7c4e220e5f91a333327bd[…]metadata-ingestion/src/datahub/ingestion/source/csv_enricher.py
perhaps you can check if the csv is correctly formatted, ie no hidden characters messing up the parsing etc