Live data from Hacker News

Time to retire the CSV?

bitsondisk.com

11–20 of 594 posts

Re: Time to retire the CSV?

#12
post #4

It's probably not news to anyone who works with data that CSVs are inferior to other file formats like parquet. I think the valuable insight here is that there needs to be a meme / movement that CSV is bad or deprecated. That's what's actually going to put the nails in its coffin, not private griping from developers when they get CSVs. I'm all for it. Down with CSV :)

I'm with you! But what does a hot new startup do when a rich old legacy corp sends them a data dump that isn't a custom sqlite database? Slowly but surely, the startup begrudgingly uses csv "just this once" until they grow into the legacy corp that sends out files in csv because "we've done it this way forever."

And the cycle continues.

Re: Time to retire the CSV?

#14
CSV is bad - but convenience is hard to beat. It's the same thing with excel. People abuse it, but you just can't beat the fact that your programmer, CEO, analyst, and secretary can all contribute to the same file.

Re: Time to retire the CSV?

#15
please don't - CSV is a perfectly fine textual file format for many things that can be used by the technical and non with a wide range of support in applications and programming languages.

Re: Time to retire the CSV?

#16
As long as it is text-based. At least you can actually look at a CSV and see what is going (wrong), as well as use all the text tools we have. Not that there aren't problems as the article points out. But some binary file based on the whims of a proprietary program...no thanks.

Re: Time to retire the CSV?

#17
post #3

"In favour of what?", that is the matter. CSV is a format more for humans and less for machines, but that is the use case: a format that is good enough to be compiled by humans and read by machines. At the moment there aren't many alternatives.

And CSV can be consumed and produced by spreadsheet software, which is useful to critical in many contexts where CSV is part of the pipeline. There the alternative would be to use xlsx files which… isn't necessarily any better.

Until someone gets excel to ingest and produce something in a better format, we're pretty much stuck.

Re: Time to retire the CSV?

#19
CSVs are plain text, and that's huge, plus they have a few other advantages:

1. You can read them without any software

2. Streamable row by row

3. Compress well

To be honest most of the points in this article could be addressed by standardizing a method of defining a schema for the CSVs. It could even be backward compatible by appending the definition as metadata on the header column or as a separate file.

One thing that would be good to have is a standardized method of indexing CSVs so that random access is possible too, though that would be more involved.

Post reply on HN