
Archiving Processed CSV Files Automatically After Import
Move each CSV out of the inbox only after its load commits, compress and verify it into dated folders, and expire old files with a clear retention rule.
Tag
40 posts

Move each CSV out of the inbox only after its load commits, compress and verify it into dated folders, and expire old files with a clear retention rule.

Four ways to make a CSV import safe to rerun, tested on one three-row file run twice: upsert on a key, row hash, replace by batch and a content-hash ledger.

Four ways to load a CSV stored in S3 into a database: a streamed pipe, the RDS aws_s3 extension, DuckDB reading s3:// directly, and a download-then-load job.

A complete psycopg 3 script that stages a daily CSV with COPY, merges it with an upsert, records a content hash, and is safe to run again after a failure.

Build a CSV import job that runs unattended: idempotent loads, one transaction, reject files, an archive, a ledger, locking, alerts and a safe backfill.

Change a value, add an attribute and delete an element in XML from a script with xmlstarlet or lxml, and compare with sed on diffs, comments and escaping.

A cron export that cannot publish a half-written file: lock, temporary name, row-count check, atomic rename. Real cron failed first, on the environment.

Layer Helm values so production overrides only what differs: maps merge, lists replace, --set wins. Rendered with helm template and checked with kubeconform.

How to move recurring Excel work into scripts: choosing VBA, Python, Office Scripts or Power Query, scheduling, merging, splitting, protecting and testing.

Pick one key style, enforce it with a JSON Schema pattern and fix old files with a yq command that renames every key. Real output for each step.

Write a JSON Schema for a YAML config, run check-jsonschema in CI, get every error with a path, and know that the loader decides what NO and 3.10 are.

Keep one base file and small overrides per environment, merge them in order and print the effective config with the source of each value. Tested layers.