Repository navigation
Add join command for two arrays on a key (0.7.0) - #9
Merged
Merged
Conversation
join KEY --with RIGHT_FILE [file] joins two lists of objects on a top-level key. Supports inner (default) and left joins, keeps left-row order, emits one row per right match, and lets right values win on key collisions. Keys match with group-by labels so CSV strings line up with JSON numbers. Adds join_rows to the library, CLI options --how and --right-from, tests, README docs, and bumps the version to 0.7.0.
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.
Adds
join KEY --with RIGHT_FILE [file], which joins two arrays of objects on a top-level key.--how inner(default) keeps matched rows;--how leftalso keeps unmatched left rows unchangedKEYappears oncegroup-by, so1and"1"line up (JSON against CSV works directly). Missing or null keys never match--right-fromjoin_rowsis exported from the package. README has a new Join section, the command table entry, and the library examples (also adds the missingstats_rowsthere). Version bumped to 0.7.0.Test plan
pytest— 91 → 109 tests (newtests/test_join.py: inner, left, multi-match, collisions, missing/null keys, empty lists, bad roots, CSV/YAML/NDJSON right files, CLI errors)