Friends don't let friends export to CSV
381–390 of 459 posts
Re: Friends don't let friends export to CSV
#382CSV does not deserve the hate.
Re: Friends don't let friends export to CSV
#383Earlier quoted context omitted.
And then you get a business analyst at your client going "I just hit export in our internal tool, what's this delimiter that you're asking me about in the upload form? Google Sheets doesn't ask me to tell them that"
And how do you fix the “some analyst” problem? Is there a better format that reduces this problem?
About half the problems with CSV are due to encoding ambiguities, the other half are due to schema mismatches.
Re: Friends don't let friends export to CSV
#384Earlier quoted context omitted.
excel now has a prompt so you can tell it to not convert stuff automatically
Gasp. Big news. I do not recall ever seeing this, so I wonder if $JOB is running some hilariously outdated version for compatibility with a load bearing VBA script.
Re: Friends don't let friends export to CSV
#385Re: Friends don't let friends export to CSV
#386Earlier quoted context omitted.
> in the real world the spec is essentially "Can you import it to Excel?" And the answer to that is always no. You will it think it's yes because it works for you, but when you send it to someone who has a different Excel version or simply different regional settings, it won't work. The recipient will first have to figure out what dialect you used to export.
On the other hand you can now use Power Query to import perquet data into Excel.
Warning you about M$, you will soon be an enterprise dev.
Re: Friends don't let friends export to CSV
#387Earlier quoted context omitted.
To me this criticism feels excessive. It feels like the author is describing their frustrations with internal usage of CSVs - there's no mention of customers and non-technical stakeholders at all. I think it goes without saying that Parquet files and other non-human-readable formats are a nonstarter when working with external stakeholders and the last paragraph makes that clear - if the end-user wants CSV, give them…
I deal with gig size csvs all the time and don’t have any performance issues. These aren’t huge files, but decent sized. And most are just a few megs and only thousands to millions of records. Csv is not very performant, but it doesn’t matter for these use cases. I’ll also add that I’m not working with the csvs, they are just I/o. So any memory issues are handled by the load process. I certainly don’t use csvs for my…
That being said, the real point here is that folks blindly use CSVs for internal-facing processes even though there's no particular reason to, and they have plenty of drawbacks. If you're just building some kind of ETL pipeline why wouldn't you use Parquet? It isn't as if you're opening stuff in Excel.
Re: Friends don't let friends export to CSV
#388Here is a crazy idea: So csv itself is abiguous, but as a convention we could encode the options in the file name. E.g data.uchq.csv means utf8, comma-separated, with header, quoted.
Re: Friends don't let friends export to CSV
#389I wish I could get Excel to stop converting Product UPCs to scientific notation when opening CSVs. Also some UPCs start with 0 Worst is when Excel saves the scientific notation back to the CSV, overwriting the correct number.
2. Enable the legacy Text Import Wizard as per [0]
3. Go to Data -> Get Data -> Legacy Wizards -> From Text (Legacy)
4. Set config based on your CSV file, typically select "Delimited" and "My data has headers" enabled
5. Click Next and pick the delimiter, typically "Comma"
6. Click Next and click the columns with UPCs, select "Text" in the "Column data format" area
7. Click Finish
(I'm not saying this is great, just sharing how to do it in case you don't know)
[0] https://professor-excel.com/import-csv-text-files-excel/
edit: you can also set up a PowerQuery query that will always open some CSV at some path and apply this config, but I don't want to have anything to do with PowerQuery, sorry.
Re: Friends don't let friends export to CSV
#390Earlier quoted context omitted.
Now all your numbers are strings
It's a text file. All your numbers were already strings. Nothing has changed.
unquoted input:
0, 10, "Text", "123"
unambiguous output:
(Num) 0, (Num) 10, (Text) Text, (Text) 123
quoted input:
"0", "10", "Text", "123"
output :
(Num) 0, (Num) 10, (Text) Text, (Num) 123