Live data from Hacker News

Q: Run SQL Directly on CSV Files

harelba.github.io

71–80 of 102 posts

Re: Q: Run SQL Directly on CSV Files

#71
post #69

“Any file is a database if you awk hard enough.” —Bryan Horstmann-Allen https://twitter.com/neilkod/status/914217352564137984 Furthermore, no thread on CSV files can be complete without mentioning this infamous bit of fact-trolling: the ASCII standard has had unit- and record-delimiters baked into it from the beginning. https://ronaldduncan.wordpress.com/2009/10/31/text-file-form...

> the ASCII standard has had unit- and record-delimiters baked into it from the beginning. That's mad that I've never heard of that before. I'm amazed this isn't used more often!

They don’t really get used IMO because if you’re storing ASCII or Unicode text, you have to be prepared for those characters to be in your data. And if you’re storing binary data, delimiters don’t really cut it in the first place.

Re: Q: Run SQL Directly on CSV Files

#72
post #71
post #69

Earlier quoted context omitted.

> the ASCII standard has had unit- and record-delimiters baked into it from the beginning. That's mad that I've never heard of that before. I'm amazed this isn't used more often!

They don’t really get used IMO because if you’re storing ASCII or Unicode text, you have to be prepared for those characters to be in your data. And if you’re storing binary data, delimiters don’t really cut it in the first place.

also they cannot be found in keyboards, if you need to write CSV by hand

Re: Q: Run SQL Directly on CSV Files

#73
post #71
post #69

Earlier quoted context omitted.

> the ASCII standard has had unit- and record-delimiters baked into it from the beginning. That's mad that I've never heard of that before. I'm amazed this isn't used more often!

They don’t really get used IMO because if you’re storing ASCII or Unicode text, you have to be prepared for those characters to be in your data. And if you’re storing binary data, delimiters don’t really cut it in the first place.

I didn't mean for CSV. There's plenty of usecases for tabular data that aren't hand coded that this could be used for. Plenty of times I've been just wanting to STGDD and not having to mess around with a serialization library, or have to select delimeters, encapsulators, do escaping etc.

Re: Q: Run SQL Directly on CSV Files

#74
post #67

The letter Q is already taken... https://en.m.wikipedia.org/wiki/Q_%28programming_language_fr...

>It is proprietary software, commercialized by Kx Systems q is available i'm thinking

What? kdb, K and Q are part of a renowned array processing toolkit/environment widely used by data scientists for decades.

Calling this command-line tool Q, which happens to be used for the same purpose as the Q programming language (i.e. querying data) begs for confusion and misunderstanding...

Re: Q: Run SQL Directly on CSV Files

#75
post #55

“Any file is a database if you awk hard enough.” —Bryan Horstmann-Allen https://twitter.com/neilkod/status/914217352564137984 Furthermore, no thread on CSV files can be complete without mentioning this infamous bit of fact-trolling: the ASCII standard has had unit- and record-delimiters baked into it from the beginning. https://ronaldduncan.wordpress.com/2009/10/31/text-file-form...

Usability suffers, if you can't type the delimiters easily.

In a terminal, Record Separator is CTRL-^, Unit Separator is CTRL-_. Vi[m] will accept the former literally, and will accept the latter if escaped with a CTRL-V.

Re: Q: Run SQL Directly on CSV Files

#78
post #8

If you're on Windows, you've had the ability to do this for Quite Some Time®: https://support.microsoft.com/en-us/help/850320/creating-an-...

Been on windows for 18 years now, never heard of this before. Sometimes I wonder if Microsoft really sucks at marketing dev tools

Probably because ODBC is old technology, if you had been developing Windows software in the late 90'ies you would probably have known.
Post reply on HN