github neilotoole/sq v0.46.0

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

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.

Don't miss a new sq release

NewReleases is sending notifications on new releases.