Quiet period
A rule that waits until a BigQuery table has been quiet for five minutes, then runs the Dataform actions downstream.
Use it when A source is loaded in many small writes and the models below should run once, after the last one.
name: Anonymized rule 3
status: active
applies_to:
node_type: BigqueryTable
node_ids:
- BigqueryTable_proj_a.dataset_x.table_y
when:
events:
- origin: self
types: BIGQUERY_INSERT
if:
quiet_period_seconds: 300
then:
target:
scope: descendants
do:
kind: single
action:
type: dataform_run
parameters: {}
Taken from services/scheduler/tests/scenarios/inactivity/inactivity_exceeded_fires.yaml
This is the rule of one of the scheduler's own test scenarios, without its id: the scenario checks that it fires once the table has seen no write for ten minutes, against a quiet period of five.
quiet_period_seconds turns a burst of inserts into one run: each new write pushes the run back, and the rule fires from
the scheduler's once-a-minute check of held actions, never straight from an event. scope: descendants acts on the
nodes downstream of the table rather than on the table itself.