github neilotoole/sq v0.40.0

latest releases: v0.48.3, v0.48.2, v0.48.1...
12 months ago

This release features a complete overhaul of the join mechanism.

Added

  • #277: A table selector can now have an alias. This in and of itself is not
    particularly useful, but it's a building block for multiple joins.

    $ sq '@sakila | .actor:a | .a.first_name'
  • New option result.column.rename that exposes a template used to rename
    result set column names before display. The primary use case is to de-duplicate
    columns names on a SELECT * FROM tbl1 JOIN tbl2, where tbl1 and tbl2
    have clashing column names (docs).

  • #157: Previously only join (INNER JOIN) was available: now the rest of
    the join types such as left_outer_join, cross_join, etc. are
    implemented (docs).

Changed

  • ☢️ #12: The table join mechanism has been
    completely overhauled. Now there's support for multiple joins. See docs.

    # Previously, only a single join was possible
    $ sq '.actor, .film_actor | join(.actor_id)'
    
    # Now, an arbitrary number of joins
    $ sq '.actor | join(.film_actor, .actor_id) | join(.film, .film_id)'
  • ☢️ The alias for --jsonl (JSON Lines) has been changed to -J.

Fixed

  • Fixed bug where config options weren't being propagated correctly.

Don't miss a new sq release

NewReleases is sending notifications on new releases.