Hourly
Get a Slack alert when a table gets no new rows
If today's load hasn't arrived by 9am, your data channel hears about it once.
- Runs
- Hourly
- Apps
- Snowflake
- AI
- Not needed
- Access
- read
Send this to your assistant
Create a ClickRuntime automation: every hour, count today's rows in the ORDERS table in Snowflake. If there are none by 9am, post one alert to #data in Slack.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A pipeline is supposed to load yesterday's orders into Snowflake by 6 a.m. One night the upstream export fails silently, the load runs against an empty file, and the table gets zero new rows. Nothing errors, so dashboards show a flat line and executives make decisions on stale numbers. The analyst finds out after lunch when someone asks why revenue looks odd. A missing load is not an event, so no tool warns you unless you check.
Every hour, ClickRuntime runs a count query on your table, such as rows loaded for yesterday's date, checks the result against the condition you define, and posts to Slack if the condition is met, for example zero rows or fewer than expected. A healthy load generates no message.
Data engineers and analytics teams who depend on daily loads use it as a simple freshness and volume check.
What you get out of it
Silent failures are surfaced
A pipeline that ran but loaded nothing looks successful in most schedulers. A direct check on the table's contents is the one test that reveals the problem. Because the check looks at the data itself, it catches problems that no job status would ever show.
Bad numbers do not reach executives
Catching an empty load by mid-morning means dashboards can be corrected or flagged before the weekly review, protecting trust in the data team. One awkward correction after a board meeting costs more than a year of checks.
Fixes happen sooner
An hourly check shortens the time between a failed load and a rerun, which often is just a matter of retriggering a job once the source system is back. Hourly checks also help you separate a one-time hiccup from a recurring fault.
Any condition can be monitored
The check is a query, so it can test for zero rows, a drop of more than half against last week, or nulls in a key column, not only missing data.
The team shares responsibility
Posting in Slack lets whoever is online pick it up, rather than the alert going to one engineer who might be on leave or asleep when the load fails. A channel keeps a visible record of who picked it up and how it was resolved.
How it works
What happens, step by step
Every hour, ClickRuntime counts how many rows have arrived today in the Snowflake table you are watching.
Once it is past 9am and the count is still zero, it treats the load as late.
A message goes to your Slack data channel saying the table has no rows yet today.
It only sends this once per day, so the channel isn't flooded while you fix the loader.
Before it runs live
- Connect Snowflake
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Run it at a different time, more or less often, or only on weekdays
- Add an AI step, for example to summarize, sort or draft a reply
- Add another app, for example also send it to Slack
- Combine it with other Snowflake steps into one automation
Under the hood
The code that runs this automation
from datetime import datetime
from zoneinfo import ZoneInfo
from clickruntime import on_trigger, credentials, http, state, notify
ACCOUNT = "myorg-myaccount"
WAREHOUSE = "ADMIN_WH"
TZ = ZoneInfo("America/New_York")
def sql(statement):
resp = http.post(f"https://{ACCOUNT}.snowflakecomputing.com/api/v2/statements",
headers={"Authorization": f"Bearer {credentials.secret('SNOWFLAKE_PAT')}",
"X-Snowflake-Authorization-Token-Type": "PROGRAMMATIC_ACCESS_TOKEN"},
json={"statement": statement, "warehouse": WAREHOUSE, "timeout": 60})
resp.raise_for_status()
return resp.json()["data"]
@on_trigger
def run(event):
now = datetime.now(TZ)
count = int(sql("SELECT COUNT(*) FROM ANALYTICS.PUBLIC.ORDERS WHERE created_at::date = CURRENT_DATE")[0][0])
today = now.date().isoformat()
if count == 0 and now.hour >= 9 and state.get("alerted_on") != today:
notify.slack(f"No rows in ORDERS yet today ({today}, {now:%H:%M}). Check the loader.", channel="#data")
state.set("alerted_on", today)
return {"rows_today": count}FAQ
Common questions
Will it alert every hour while the problem continues?
Can it check more than one table?
What if the load is normally late on weekends?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Get an email when a warehouse uses too many credits
Each morning you learn which warehouses used more than your limit in the last 24 hours.
See how it worksEmail a KPI query's results every morning
The numbers you'd otherwise open Snowsight for arrive as a table in your inbox.
See how it worksKnow the moment your website goes down
Your team hears in Slack when the site stops responding or slows down, and again when it's back.
See how it worksKeep exploring
Set up “Get a Slack alert when a table gets no new rows” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.