Docs: recipe for updating a CSV database file from a partial download (#826) - #2153
Merged
Conversation
…#826) Adds a section to the questions-about-joins page showing how to update matching records of a durable CSV file from a download containing a subset of records and a subset of columns, using join --ul with the database as the left file (right-file values win on collision), plus variants for restoring row order and for keeping database values when the download has empty cells. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
johnkerl
marked this pull request as ready for review
July 9, 2026 19:18
…recipe # Conflicts: # docs/src/questions-about-joins.md # docs/src/questions-about-joins.md.in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#826
Adds a new section to the questions-about-joins page: updating a durable "database" CSV file from a periodic download that contains a subset of its records and a subset of its columns, with no new records or columns introduced.
The recipe hinges on
join's collision rule -- on paired records, non-join field values from the right file overwrite those from the left file -- so the database goes on the left (-f) and the download on the right, with--ulpassing through database records that received no update. The output schema then automatically matches the database file's columns and column order. Two variants are included:then sort -t idto restore the original row ordering (paired records stream out in download order, unpaired ones after);--rp+putvariant so that empty cells in the download leave the database values alone rather than blanking them out (a pitfall the issue reporter hit directly).All examples are live GENMD samples verified against a fresh build, with two small new sample files
docs/src/data/update-db.csvanddocs/src/data/update-download.csv.🤖 Generated with Claude Code