Scheduled Report Delivery
While error notifications alert you when things go wrong, scheduled reports proactively deliver data summaries when things go right. This pattern uses Evaluate Expression steps with an On True expression notification to send reports on a schedule.
How It Works
- An Evaluate Expression step runs a SQL query that computes metrics
- The expression is set to
{{ true }}(always passes) - A notification with the On True expression trigger fires every time the step succeeds
- The notification title and body include the computed metrics
Example: Daily Row Count Report
Step SQL:
SELECT
FORMAT('%\'d', COUNT(*)) AS total_rows,
FORMAT('%\'d', COUNTIF(DATE(imported_at) = CURRENT_DATE())) AS today_rows,
FORMAT('%\'d', COUNTIF(DATE(imported_at) = DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY))) AS yesterday_rows
FROM my_schema.my_contacts_table
Evaluate expression:
{{ true }}
Notification config:
| Setting | Value |
|---|---|
| Trigger | On True expression |
| Notify via | |
| Title | Daily Report: Contacts Summary |
| Body | Total: {{ $response.total_rows }}, Today: {{ $response.today_rows }}, Yesterday: {{ $response.yesterday_rows }} |
Example: Pipeline Health Summary
Step SQL:
WITH tables AS (
SELECT 'orders' AS table_name, MAX(db_row_timestamp) AS latest FROM core.orders
UNION ALL
SELECT 'customers', MAX(db_row_timestamp) FROM core.customers
UNION ALL
SELECT 'products', MAX(db_row_timestamp) FROM core.products
)
SELECT
STRING_AGG(
FORMAT('%s: %s', table_name, FORMAT_TIMESTAMP('%Y-%m-%d %H:%M', latest)),
'\n'
) AS pipeline_summary,
COUNTIF(DATE(latest) < CURRENT_DATE()) AS stale_count
FROM tables
Notification body:
Pipeline Health Check:
{{ $response.pipeline_summary }}
Stale tables: {{ $response.stale_count }}
Combining Reports with Assertions
You can chain a report step before or after assertions to get both a summary and failure alerts:
Step 1: "Daily Report" (Evaluate Expression, {{ true }}, On True expression → sends summary)
→ Next step on true: "Assertion: uniqueness"
Step 2: "Assertion: uniqueness" (On False expression → alert if fails)
→ Next step on true: "Assertion: freshness"
Step 3: "Assertion: freshness" (On False expression → alert if fails)
This way, the team receives a daily summary email and individual alerts for any assertion failures.
Tips
- Schedule report workflows at the end of your data pipeline (after all imports and transformations)
- Use
FORMATto make numbers readable (e.g.FORMAT('%\'d', 1234567)→1,234,567) - Keep notification bodies concise — emails with key metrics are more useful than walls of text
- Use
$response.*variables to inject query results directly into notification titles and bodies - Combine with cross-workflow dependencies to ensure reports only run after all upstream workflows complete