Lanes freight exceptions
World clock Tue 18:00:00 UTC held · 120×

Definitions

The definitions the operator and Ask both run on. Each has an owner, a version, SQL and tests. Edits make a new version.

Rolled shipments

rolled unit: shipments canonical: ops

Shipments a carrier moved to a later sailing than the one booked, whether or not the customer was told.

opsHead of Operations · ops v1canonical

Shipments with a 'rolled' event in the period, at or before now.

latest change: First version.

  • pass count_betweenobserved 561, expected between 50.0 and 1000.0
SQL, rendered for now
SELECT e.shipment_id, s.ref, e."at" AS rolled_at, json_extract_string(e.payload, '$.from_code') AS from_voyage,
       json_extract_string(e.payload, '$.to_code') AS to_voyage
FROM shipment_events e JOIN shipments s ON s.id = e.shipment_id
WHERE e.type = 'rolled' AND e."at" <= TIMESTAMP 'Tue 18:00:00' AND e."at" >= TIMESTAMP 'Sun 18:00:00 (30 days ago)' AND e."at" < TIMESTAMP 'Tue 18:00:00'
ORDER BY e."at", e.shipment_id

History

append-only; nothing is edited in place
  1. definitionHead of Operations ops v1 First version.