Forum Discussion
Loading Tab Separated CSV file into Delta Tables
- Anonymous2 years ago
Hi FabricRooky
We have escalated it internally and got a confirmation that Tab is treated as a whitespace in Spark which we use to convert the data to a delta table. It is not supported currently. Please vote up the Microsoft Idea. It is in “Under Review” status which means this idea is under PG’s review.
frithjof_v Thank you for paying attention to this and providing the link to the idea.
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
Hi FabricRooky
Based on my test, I have the same error when using the GUI Load to Tables feature and defining "\t" as separator. It seems the "\t" cannot be recognized as an effective separator for the CSV file so it reports this error. I'll do some more test to look into whether we can replace "\t" with another character.
As an alternative, you can use Notebook to load data from CSV to Delta table.
Open your current lakehouse, open or create a notebook. Paste below code into a code cell. Modify the file path and table name accordingly. Then run the code cell. This will read data from the CSV file and write it into a new table or overwrite an existing table which has the same name.
table_name = "testTable"
df.write.mode("overwrite").format("delta").save("Tables/" + table_name)
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
This is exactly what I wanted to avoid 😑
- frithjof_v2 years agoCommunity Champion
Please vote for this idea in order to highlight the need: https://ideas.fabric.microsoft.com/ideas/idea/?ideaid=94e5b20e-9baf-ee11-92bd-6045bd7d9d7c