Weekday morning build
A scheduling rule that runs a Dataform release every weekday at 06:30, Paris time, before the teams start.
Use it when Some tables must be built on a clock, whatever the sources did overnight.
- name: Build the morning reporting tables
code_id: reporting/morning-build
description: Runs the reporting release every weekday morning before the teams start.
priority: 3
status: active
applies_to:
tags:
- morning_reporting
when:
schedule:
cron: "30 6 * * 1-5"
time_zone: Europe/Paris
then:
target:
same_as_applies_to: true
scope: node
group: true
do:
kind: single
action:
type: dataform_run
parameters:
release: projects/YOUR_PROJECT-{ENV}/locations/YOUR_REGION/repositories/YOUR_REPOSITORY/releaseConfigs/reporting
- Line 1Runs on a clock: every weekday at 06:30, Paris time, the Dataform release of the environment being synced.
- Line 1{ENV} becomes dev, test or prod at evaluation time.
Taken from examples/rules-repo/rules/example_cron_rule.yaml
when.schedule fires the rule on time instead of on an event: cron takes one expression or a list, and time_zone
an IANA name, so 06:30 stays 06:30 in Paris across the clock changes. group: true starts one Dataform invocation for
every action tagged morning_reporting, not one each.
A rule can listen for events and keep a schedule at once. Add wait_for_new_data: true under schedule to skip the
run when nothing new arrived since the last one.
Variations. The same entry, written for another case.
Every hour
The deployment repository's example runs the actions tagged example_daily at the top of every hour, in UTC.
- name: Run the example actions every hour
priority: 4
status: active
description: Runs the Dataform actions tagged example_daily every hour
code_id: example/example-daily-hourly
applies_to:
tags:
- example_daily
when:
schedule:
cron: '0 * * * *'
time_zone: UTC
wait_for_new_data: false
then:
target:
same_as_applies_to: true
scope: node
group: true
do:
kind: single
action:
type: dataform_run
parameters:
release: projects/YOUR_PROJECT_ID/locations/YOUR_REGION/repositories/YOUR_REPOSITORY/releaseConfigs/YOUR_RELEASE
- Line 1An example scheduling rule: every hour, run the Dataform actions tagged `example_daily`. ci/config-sync.sh dev
- Line 1pushes this directory with `nistor rules sync --env dev --dir envs/dev/config/rules`. Replace the placeholders.