Skip to content

v0.46.0

Compare
Choose a tag to compare
@neilotoole neilotoole released this 22 Nov 19:09
· 111 commits to master since this release

Added

  • #338: While sq has had group_by for some time, somehow the having mechanism was never implemented. That's fixed.

    $ sq '.payment | .customer_id, sum(.amount) | group_by(.customer_id) | having(sum(.amount) > 200)'
    customer_id  sum(.amount)
    526          221.55
    148          216.54
  • #340: The group_by function now has a synonym gb, and order_by now has synonym ob. These synonyms are experimental 🧪. The motivation is to reduce typing, especially the underscore (_) in both function names, but it's not clear that the loss of clarity is worth it. Maybe synonyms group and order might be better? Feedback welcome.

    # Previously
    $ sq '.payment | .customer_id, sum(.amount) | group_by(.customer_id) | order_by(.customer_id)'
    
    # Now
    $ sq '.payment | .customer_id, sum(.amount) | gb(.customer_id) | ob(.customer_id)'
  • #340: sq inspect: added flag shorthand -C for --catalogs and -S for --schemata. These were the only inspect flags without shorthand.