3 ms·
MySQL has supported CSV as a data source for quite some time: http://dev.mysql.com/doc/refman/5.6/en/csv-storage-engine.html http://dev.mysql.com/doc/refman/5.6
by jeremysmyth 13y ago
MySQL has supported CSV as a data source for quite some time:
http://dev.mysql.com/doc/refman/5.6/en/csv-storage-engine.html http://dev.mysql.com/doc/refman/5.6/en/csv-storage-engine.ht...
You can run full SQL queries directly against a text file as if it was a table.
- thingsilearned 13y agoYeah, and that's how we used to direct customers who wanted upload CSV data. We even wrote some nice tutorials on how to set it up https://chartio.com/education/databases/excel-to-mysql https://chartio.com/education/databases/excel-to-mysql But we found that many people either aren't technical enough, or didn't want to go through the hassle of setting up a MySQL instance, defining a schema, and cleaning the data. So now we do that for them.
- tryitnow 13y agoGood call. I'm a financial analyst who is becoming increasingly comfortable with code in general, but I can tell you 80-90% of business users lose interest as soon as anything SQL comes up. Heck, 70% of business users chicken out if an Access db is involved. So this should really get a much, much bigger audience to use chartio.
- justinator 13y agoPerl's DBI also has a driver for CSV as the datasource, https://metacpan.org/module/DBD::CSV https://metacpan.org/module/DBD::CSV
- eli 13y agoI haven't used it in ages, but Log Parser -- a fantastic old Microsoft skunkworks project -- lets you run full SQL directly against CSV files, Apache logs, the Windows Registry, Active Directory, file paths... http://www.microsoft.com/en-us/download/details.aspx?id=24659 http://www.microsoft.com/en-us/download/details.aspx?id=2465... Windows only, natch.
- Ecio78 13y agoMicrosoft SQL Server has a couple of methods for querying CSV/XLS(X) files (I remember at least OPENROWSET and BULK INSERT), but sometimes it's a bit tricky to use/configure (have the right OLEDB driver, use INI files for configuration etc..) or the behaviour is not very consistent/well-documented Edit: of course with BULK INSERT you don't directly query the file, you must load it to a (temp) table