Simon Willison’s Weblog

Newsletter
Atom feed for sqlite Random

885 posts tagged “sqlite”

2020

Weeknotes: Datasette Writes

As discussed previously, the biggest hole in Datasette’s feature set at the moment involves writing to the database.

[... 604 words]

Release asgi-log-to-sqlite 0.1.1 — ASGI middleware for logging traffic to a SQLite database

Things I learned about shapefiles building shapefile-to-sqlite

Visit Things I learned about shapefiles building shapefile-to-sqlite

The latest in my series of x-to-sqlite tools is shapefile-to-sqlite. I learned a whole bunch of things about the ESRI shapefile format while building it.

[... 1,073 words]

Release shapefile-to-sqlite 0.2 — Load shapefiles into a SQLite (optionally SpatiaLite) database
Release shapefile-to-sqlite 0.1 — Load shapefiles into a SQLite (optionally SpatiaLite) database
Release db-to-sqlite 1.1.1 — CLI tool for exporting tables or queries from any SQL database to a SQLite file
Release db-to-sqlite 1.1 — CLI tool for exporting tables or queries from any SQL database to a SQLite file
Release geojson-to-sqlite 0.2 — CLI tool for converting GeoJSON files to SQLite (with SpatiaLite)
Release sqlite-utils 2.3.1 — Python CLI utility and library for manipulating SQLite databases
Release sqlite-utils 2.3 — Python CLI utility and library for manipulating SQLite databases
Release twitter-to-sqlite 0.16 — Save data from Twitter to a SQLite database
Release sqlite-utils 2.2.1 — Python CLI utility and library for manipulating SQLite databases
Release sqlite-utils 2.2 — Python CLI utility and library for manipulating SQLite databases
Release geojson-to-sqlite 0.1.2 — CLI tool for converting GeoJSON files to SQLite (with SpatiaLite)

geojson-to-sqlite (via) I just put out the first release of geojson-to-sqlite—a CLI tool that can convert GeoJSON files (consisting of a Feature or a set of features in a FeatureCollection) into a table in a SQLite database. If you use the --spatialite option it will initalize the table with SpatiaLite and store the geometries in a spacially indexed geometry field—without that option it stores them as GeoJSON.

# 31st January 2020, 6:40 am / cli, geospatial, projects, spatialite, sqlite, geojson

Release geojson-to-sqlite 0.1.1 — CLI tool for converting GeoJSON files to SQLite (with SpatiaLite)
Release geojson-to-sqlite 0.1 — CLI tool for converting GeoJSON files to SQLite (with SpatiaLite)
Release geojson-to-sqlite 0.1a — CLI tool for converting GeoJSON files to SQLite (with SpatiaLite)
Release sqlite-utils 2.1 — Python CLI utility and library for manipulating SQLite databases

Generated Columns in SQLite (via) SQLite 3.31.0 released today, and generated columns are the single most notable new feature. PostgreSQL 12 added these in October 2019, and MySQL has had them since 5.7 in October 2015. MySQL and SQLite both offer either “stored” or “virtual” generated columns, with virtual columns being calculated at runtime. PostgreSQL currently only supports stored columns.

# 24th January 2020, 4:20 am / mysql, postgresql, sql, sqlite

Serving 100µs reads with 100% availability (via) Fascinating use-case for SQLite from Segment: they needed a massively replicated configuration database across all of their instances that process streaming data. They chose to make the configuration available as a ~50GB SQLite database file mirrored to every instance, meaning lookups against that data could complete in microseconds. Changes to the central MySQL configuration store are pulled every 2-3 seconds, resulting in a trade-off of consistency for availability which fits their use-case just fine.

# 10th January 2020, 5:15 am / scaling, sqlite, segment

Release sqlite-utils 2.0.1 — Python CLI utility and library for manipulating SQLite databases

2019

sqlite-utils 2.0: real upserts

I just released version 2.0 of my sqlite-utils library/CLI tool to PyPI.

[... 1,140 words]

Release sqlite-utils 2.0 — Python CLI utility and library for manipulating SQLite databases

athena-sqlite (via) Amazon Athena is the AWS tool for querying data stored in S3—as CSV, JSON or Apache Parquet files—using SQL. It’s an interesting way of buliding a very cheap data warehouse on top of S3 without having to run any additional services. Athena recently added a query federation SDK which lets you define additional custom data sources using Lambda functions. Damon Cortesi used this to write a custom connector for SQLite, which lets you run queries against data stored in SQLite files that you have uploaded to S3. You can then run joins between that data and other Athena sources.

# 18th December 2019, 9:05 am / amazon-web-services, athena, s3, sql, sqlite, parquet

Logging to SQLite using ASGI middleware

I had some fun playing around with ASGI middleware and logging during our flight back to England for the holidays.

[... 2,535 words]

Release asgi-log-to-sqlite 0.1 — ASGI middleware for logging traffic to a SQLite database
Release yaml-to-sqlite 0.3 — Utility for converting YAML files to SQLite
Release github-to-sqlite 0.6 — Save data from GitHub to a SQLite database
Release twitter-to-sqlite 0.15 — Save data from Twitter to a SQLite database