Forum Discussion
Error while Processing CSV from AzureBlob
- 1 year ago
Hi DRSH_9876 ,
You can follow these checks to troubleshoot-
1. CSV File Format Check -> The file is encoded in UTF-8.2. Data Pipeline: Use Copy Data with Custom File Format
In Copy Data activity, after selecting the source blob and file:
Set File format to "Delimited Text", Use comma (,) as delimiter.
Ensure:
First row as header = true
Quote character = "", Escape character = \(optional)
Set Bad rows action to "Skip" or "Log and continue" if possible
If BadDataFound is throwing an error, it means the second row doesn't match the header format.
You can also, upload the CSV manually into OneLake (Lakehouse > Files) first, validate it, and use "Load to Table" from the Lakehouse Files UI.3. File Handling Best Practice for Daily Ingestion
To handle daily updates:
4.Store files in a dated folder structure, e.g., container/year/month/day/filename.csv
5.Turn on "Preview raw data" in Data Pipeline if troubleshooting malformed CSVs.
6.Consider using Azure Data Factory (if Fabric fails) to clean the CSV and land it in OneLake.
7.Create a Dataflow Gen2 for more robust ingestion and transformation logic.
Additionally, you can follow the steps mentioned in this link to copy data successfully into the lakehouse.
https://learn.microsoft.com/en-us/fabric/data-factory/copy-data-activity
https://learn.microsoft.com/en-us/fabric/data-engineering/load-data-lakehouse
Hope this helps!
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You!