
Publishing Database Results to a Sheet Automatically
Publish database results to a Google Sheet on a schedule: replace a range safely, mark it generated, stamp the update time and alert on failure.
Everything you need to level up your coding skills.

Publish database results to a Google Sheet on a schedule: replace a range safely, mark it generated, stamp the update time and alert on failure.

Pipe a PostgreSQL export into gzip or zstd: 130 MB became 42 MB in 4.6 s, with six settings compared and the pipeline that exits 0 after a failed export.

Total 5,000 XML invoice files in under a second with Python, xmlstarlet or grep, group by currency, and catch malformed files and missing totals.

One timestamp exported as 09:30+00, 16:30+07 and 04:30-05, and dd.mm.yyyy that pandas read as 3 January. Fix dates and booleans in the query, not the session.

Compare the Google Sheets QUERY function with SQL: select, where, group by, order by, label and limit side by side, what QUERY lacks, and when to use which.

Compare gzip, zstd and xz on a 36 MB JSON Lines file for size and speed, and read the result back with jq, DuckDB, pandas and Python without unpacking.

Export a 2,000,000 row table to CSV six ways: peak memory ranged from 11 MB to 2 GB, time from 1.6 s to 14 s. fetchall and pandas are the ones that run out.

A method for turning an XML file into answers: inspect its shape, extract the fields once, check counts and totals, join carefully and record the result.

Find image versions that disagree across Compose, CI, Helm and Kubernetes files in one pass: postgres in five tags, redis in three and latest in three files.

Use the Google Sheets API from Python: create a service account, share the sheet, read and write ranges in batches, set value options and handle quota errors.

Export SQLite to CSV with a header row from the sqlite3 shell: CRLF endings by default, NULL against empty string, types and 2,000,000 rows in 3.5 s.

Compare PostgreSQL query plans before and after a change: capture both, control cache and noise, line up nodes and decide if the gain is real or warm cache.
We send one email when a new article is published. No spam.