Data freshness
BigQuery data freshness alerts for missing daily imports
Check whether the daily import actually finished, even when it brought in no rows. Use a run log, a short query, and a scheduled Slack alert.
Measure the age of a successful import
Illustration · scheduled checks every 12 or 24 hours
Did the daily import finish, or is the table just quiet? An order count can’t always tell you. A record of the last successful run is a better place to start. We’ll check how long it’s been since daily_orders finished and queue a Slack notification when that age is more than 24 hours.
1. Record successful import completions
For this example, your import process needs to write a small BigQuery run log with pipeline_name, status, and a TIMESTAMP completed_at. Only record succeeded after the whole expected batch is complete. Your pipeline owns that step. Kisu won’t create the log, run the import, or decide whether a partial batch is good enough.
A run log also lets you tell “the import finished with zero rows” from “the import never ran.” The latest timestamp on an imported row can’t tell you that, because an empty batch adds no rows. Choose the signal that reflects what a successful run means for your pipeline.
2. Calculate minutes since the last successful run
SELECT COALESCE(
TIMESTAMP_DIFF(
CURRENT_TIMESTAMP(), MAX(completed_at), MINUTE
),
1441
) AS minutes_since_last_import
FROM `your-project.monitoring.import_runs`
WHERE pipeline_name = 'daily_orders'
AND status = 'succeeded'Swap in your table, pipeline name, and success status. TIMESTAMP_DIFF gives the elapsed whole minutes. If there’s no successful run in the log, MAX returns NULL. COALESCE then substitutes 1441, a fallback value one minute above our threshold. That lets the rule match even when the log has no successful history.
That fallback is a sentinel: a number chosen to mean “no successful run found,” not a measured age. If you raise the threshold, raise the sentinel above it too. It won’t hide a table-access error; a query that can’t read the log still fails. Google’s TIMESTAMP_DIFF reference explains the timestamp calculation.
3. Configure the freshness condition in Kisu
- Activate a Kisu subscription and connect the BigQuery project with permission to query the log table.
- Add a Slack destination for the pipeline owner and use Send test. Keep its webhook private.
- Create an alert named Daily orders import overdue, paste the query, and click Load columns.
- Select minutes_since_last_import, choose Sum, and set greater than 1440.
- Use Test query, select the tested destination, choose a 12- or 24-hour check, and save.
Choose Sum to keep the single age value returned by the query. Count would give you the number of summary rows, which is 1, not the age of the import. Both query previews and scheduled checks can incur BigQuery charges, separately from Kisu.
4. Allow for import timing and detection delay
Try the rule against a development run log. An age of 60 minutes shouldn’t match. Neither should exactly 1440, because the comparison is greater than, not greater than or equal to. At 1560 it should match. A log with no successful run should match too, through the fallback value.
If the job normally runs a little later some days, give it some breathing room beyond 24 hours. Kisu checks every 12 or 24 hours, so crossing the threshold won’t trigger an immediate notification. This isn’t an exact morning-deadline alarm or a real-time incident monitor.
Kisu checks every 12 or 24 hours, not in real time. Enter your preferred time under Starting at, using the timezone shown beside the input. Change it in Settings from your email menu. With a 12-hour schedule, you’ll get a second check 12 hours later. New alerts use Just when the issue starts, so one ongoing problem won’t keep sending messages. Want reminders? Choose As long as the issue persists for a notification on every successful matching check. When the condition no longer matches, the incident resolves without a recovery message.
After a check, open History and look at three things: the number, whether the condition matched, and whether the notification was delivered. A failed check or no-data result does not send a threshold notification or resolve an open incident. You can review completed checks and delivery history for 30 days.
Troubleshooting a stale or misleading timestamp
Check the pipeline name and status spelling first, then look for failed log writes or timestamps accidentally set in the future. Also check when the pipeline records success. A fresh success timestamp won’t help if it was written before the data finished loading.
An import can finish successfully and still contain fewer rows than you expected. For that question, add a separate row-count floor alert. Keeping freshness and volume separate gives the person responding a clearer place to start.


3. Queue a Slack notification