One-liner for running queries against CSV files with SQLite
I figured out how to run a SQL query directly against a CSV file using the sqlite3 command-line utility:
Browse by topic: ab 1 · amplitude 1 · asgi 1 · auth0 2 · aws 9 · awslambda 1 · azure 1 · bash 11 · caddy 1 · chrome 1 · claude-code 2 · clickhouse 2 · cloudflare 10 · cloudrun 8 · cocktails 3 · cookiecutter 2 · cooking 1 · cosmopolitan 1 · css 3 · datasette 19 · deno 3 · digitalocean 1 · discord 1 · django 19 · docker…
Visit til.simonwillison.net → RSS feedOn Hacker News Oct 2020 – Nov 2023
Tools & Productivity 10Software Engineering 8Databases & Data 3Web & Frontend 2Programming Languages 2AI & Machine Learning 1
I figured out how to run a SQL query directly against a CSV file using the sqlite3 command-line utility:
Seth Michael Larson pointed out that the Python gzip module can be used as a CLI tool like this:
TIL this trick, via Pascal Hirsch on Twitter. Enter a line of Bash starting with a # comment, then run !:q on the next line to see what that would be with proper Bash escaping applied.
The Algolia-powered Hacker News API returns nested comment threads that look like this: https://hn.algolia.com/api/v1/items/27941108
See also: Large language models are having their Stable Diffusion moment right now .
We launched the Datasette Cloud blog today. The Datasette Cloud site itself is a Django app - it uses Django and PostgreSQL to manage accounts, teams and soon billing and payments, then launches dedicated containers running Datasette for each customer.
David Beazley on Twitter said:
I wanted to convert some .webp images to .png on my Mac. I asked ChatGPT:
vivym/midjourney-messages on Hugging Face is a large (~8GB) dataset consisting of 55,082,563 Midjourney images - each one with the prompt and a URL to the image hosted on Discord.
Hacker News displays comments in a tree. This can be frustrating if you want to keep track of a particular conversation, as you constantly have to seek through the tree to find the latest comment.
For sqlite-utils issue 250 I needed to locate some test CSV files that start with a UTF-8 BOM.
Via this comment on Hacker News I started exploring the ClickHouse Playground . It's really cool, and among other things it allows CORS-enabled API hits that can query a decade of history from the GitHub events archive in less than a second.
David Beazley on Twitter :