Rule

Failsafe deadline

A scheduling rule that rebuilds a sales mart once its sources settle, or at 07:30 if no load came.

Use it when A mart is event-driven, but a morning report needs it built by a fixed time even when a source is late.

By The Nistor team

- name: Refresh the daily sales mart after the warehouse loads
  code_id: marts/mart-sales-daily
  description: Rebuilds mart_sales_daily once its source tables have settled.
  priority: 5
  status: active
  status_by_env:
    dev: paused
  tags:
    - marts
    - sales
  applies_to:
    node_type: DataformAction
    node_ids:
      - DataformAction_acme-mart-{ENV}.marts.mart_sales_daily
  when:
    events:
      - origin: ancestors
        ancestor_depth: direct_materialized
        types:
          - BIGQUERY_INSERT
          - BIGQUERY_MERGE
    wait_for_all_ancestors: true
    wait_for_all_ancestors_timeout_seconds: 5400
    wait_for_all_ancestors_timeout_alert: true
  if:
    quiet_period_seconds: 600
  then:
    target:
      same_as_applies_to: true
      scope: node
    do:
      kind: single
      action:
        type: dataform_run
        parameters:
          release: projects/acme-mart-{ENV}/locations/europe-west1/repositories/acme-marts/releaseConfigs/daily
  failsafe:
    enabled: true
    deadline_cron: "30 7 * * *"
    time_zone: Europe/London
  1. Line 2the rule's stable identity when it is kept as a file
  2. Line 6file-only: the status per environment
  3. Line 17events on the nodes this one reads from
  4. Line 19matched exactly; list every write type you care about
  5. Line 22fire once every source has produced a new event
  6. Line 26wait for 10 quiet minutes before running
  7. Line 37acts on machines: run the rule if no trigger came

Taken from docs/concepts/scheduling.md

The scheduling docs' example rule, without its limits and retries (see Retry with backoff) and its freshness expectation (see Freshness expectation). The acme names are fictional.

The rule waits for every source of the mart, then for ten quiet minutes. The failsafe acts on machines: if no trigger came by 07:30, London time, Nistor runs the action itself, and raises no alert. Set exactly one of deadline_cron and deadline_after_seconds; the second also needs window: rolling.

Feeds fromGoogle Cloud

See your platform as one graph, on your laptop. Explore the demo estate, or book a walkthrough on one like yours.