Skip to content

v0.40.0

Compare
Choose a tag to compare
@neilotoole neilotoole released this 03 Jul 15:58
· 220 commits to master since this release
7396aad

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.