How Do You Write a Data SLA Your Team Can Actually Keep?

Most data SLAs are wishes with a timestamp. How to pick the indicator, set the target from your own arrival history, and spend an error budget.

How Do You Write a Data SLA Your Team Can Actually Keep?

A data SLA is a written commitment to a named consumer that a dataset will meet a measurable condition, such as arriving by 08:00, on a stated share of days, with an owner who answers for it and an agreed response when it's missed. Take away any one of those parts and what's left is a hope.

Most teams have the hope. "Dashboards fresh by 8am" sits in a Confluence page or a Slack pin, nobody measures it, and the first anyone hears of a miss is a VP asking why yesterday's revenue reads zero. The SLA didn't fail that morning. It was never an SLA.

Why do most data SLAs get broken silently?

Because they're written as outcomes nobody instruments. "Fresh by 8am" sounds precise and contains almost no information. Fresh by which table? Measured how? Every day, or most days? And who gets the call when it's 08:15?

Run the usual data SLA through four questions and it fails all of them:

  1. Is there a measurement? Usually no. Nothing records, day by day, whether the condition held. So there's no history, and no way to say whether the SLA is being met 99% of the time or 70%.
  2. Is there a tolerance? Usually no. The implied target is 100%, which no batch pipeline on a shared warehouse has ever hit for a full quarter. A target you will certainly miss trains everyone to ignore it.
  3. Is there an owner? Usually "the data team," which means nobody in particular.
  4. Is there a consequence? Usually nothing happens after a miss except an apology in a thread.

The silent part comes from the first gap. Without a measurement, a miss only exists if a human notices it. On a Saturday, or on a dashboard nobody opens until Tuesday, it doesn't exist at all. Your real reliability is lower than anyone thinks, and you can't prove otherwise in either direction.

I'd argue that an unmeasured SLA is worse than having none. With none, consumers know to check. With an unmeasured one, they trust a guarantee that's only enforced by luck.

What's the difference between an SLA, an SLO, and an SLI for data?

The three terms come from site reliability engineering, popularized by Google's SRE book, and they map onto data pipelines cleanly once you swap "request" for "dataset delivery."

Term What it is Data example Who sees it
SLI (indicator) The measured quantity Minutes past midnight when fct_orders finished loading The owning team
SLO (objective) Your internal target for the SLI Loaded by 07:00 on 98% of days The owning team
SLA (agreement) The external promise, with a consequence Loaded by 08:00 on 95% of days, or we post an incident note and a fix date The consumer
Error budget The failures the target allows 95% of 30 days = 1.5 late days a month Both

The relationship that matters: the SLO is tighter than the SLA. If you promise consumers 08:00 and your internal alarm is also set to 08:00, you learn about every breach at the same moment they do. Set the SLO an hour earlier and you get an hour of warning to fix it before the promise breaks.

Most data teams need the SLI and SLO far more than the SLA. A formal agreement with a consequence makes sense for maybe 5 to 10 datasets that feed finance, executives, customers, or regulators. Everything else is better served by an internal objective with no external promise attached. Writing SLAs for 200 tables is how you end up with 200 documents nobody reads.

Which indicator should a data SLA measure?

Pick the one whose failure your consumer actually feels. For most analytics consumers that's freshness, because a late table breaks a dashboard visibly and an hour of lateness has an obvious cost. The other indicators are real but rarely the first one to formalize.

Indicator What it measures How you compute it Good for
Freshness lag Time between a deadline and the data becoming queryable Load timestamp vs deadline, per period Daily and hourly batch feeding dashboards
Completeness Share of expected rows or partitions that arrived Row count vs trailing baseline, or partition count vs expected Event feeds, multi-source unions
Correctness Share of rows passing validity checks Failed checks / total rows Finance, billing, regulatory extracts
Availability Whether the table can be queried at all Successful probe queries / total probes Data products served to applications

Three rules for choosing:

Measure the table the consumer reads, not the one you load. An SLA on raw_orders tells the finance team nothing if fct_revenue sits three transformations downstream and one of them fails. The SLI belongs at the last hop before a human or an application touches the data.

Measure the data, not the job. An Airflow task that turns green proves the task ran. It doesn't prove rows landed. The freshness monitoring post covers that gap, and it's the single most common reason an SLA reports "met" on a day the dashboard was wrong.

Start with one indicator. A freshness SLA with real measurement beats a four-indicator SLA with none. Add completeness once freshness is boring, because a table can arrive on time with half its rows and freshness will call it a success.

How do you measure freshness lag correctly?

Freshness lag sounds obvious and has three traps.

Trap one: business timestamps. MAX(order_date) tells you the newest order in the table, which is a property of your customers, not your pipeline. On a quiet Sunday it looks stale when the load ran fine. Use a load timestamp: _loaded_at, _fivetran_synced, a dbt-stamped current_timestamp(), or the completion time from your orchestrator's run table.

Trap two: reruns. If somebody backfills at 15:00, MAX(_loaded_at) for that day jumps to 15:00 and your history says the load was seven hours late. Use the first load of the day when your loader stamps one timestamp per run. If it stamps per row over a long load, use the orchestrator's completion time instead, since the first row landing isn't the same as the table being ready.

Trap three: missing days. A GROUP BY over load dates silently drops days when nothing loaded at all. Those are your worst days, and a query that can't see them will flatter you. Join against a calendar so a missed day counts as late.

If you don't have a load column, both warehouses keep write history you can use. In Snowflake, ACCOUNT_USAGE.ACCESS_HISTORY records modified objects per query on Enterprise Edition and above, and keeps a year of it, enough to bootstrap 90 days of arrival times. On Databricks, DESCRIBE HISTORY on a Delta table returns commit timestamps, but only 30 days of them by default (delta.logRetentionDuration).

How do you set an SLA target from historical data?

From your own arrival history, never from what the consumer wishes were true. The consumer tells you the deadline they need. History tells you how often you can hit it. The target is where those two meet, and if they don't meet, the conversation is about fixing the pipeline, not about writing a better sentence.

Here's the query for a once-a-day batch table. It builds a 90-day calendar, finds the first load on each day, and reports percentiles of arrival time in minutes past midnight, plus the on-time rate against a candidate deadline.

Snowflake:

-- Snowflake: 90 days of arrival history for a daily batch table
WITH days AS (
  SELECT DATEADD('day', -ROW_NUMBER() OVER (ORDER BY SEQ4()), CURRENT_DATE()) AS load_date
  FROM TABLE(GENERATOR(ROWCOUNT => 90))
),
arrivals AS (
  SELECT
    TO_DATE(_loaded_at)  AS load_date,
    MIN(_loaded_at)      AS first_load_at
  FROM analytics.fct_orders
  WHERE _loaded_at >= DATEADD('day', -91, CURRENT_DATE())
  GROUP BY 1
),
joined AS (
  SELECT
    d.load_date,
    HOUR(a.first_load_at) * 60 + MINUTE(a.first_load_at) AS arrival_minute
  FROM days d
  LEFT JOIN arrivals a ON a.load_date = d.load_date
)
SELECT
  COUNT(*)                                                     AS days_in_window,
  COUNT(arrival_minute)                                        AS days_with_a_load,
  PERCENTILE_CONT(0.50) WITHIN GROUP (ORDER BY arrival_minute) AS p50_minute,
  PERCENTILE_CONT(0.95) WITHIN GROUP (ORDER BY arrival_minute) AS p95_minute,
  PERCENTILE_CONT(0.99) WITHIN GROUP (ORDER BY arrival_minute) AS p99_minute,
  MAX(arrival_minute)                                          AS worst_minute,
  COUNT_IF(arrival_minute <= 8 * 60) / COUNT(*)                AS on_time_rate_0800
FROM joined;

Databricks:

-- Databricks SQL: same query, Spark SQL date functions
WITH days AS (
  SELECT explode(sequence(date_sub(current_date(), 90),
                          date_sub(current_date(), 1),
                          INTERVAL 1 DAY)) AS load_date
),
arrivals AS (
  SELECT
    to_date(_loaded_at)  AS load_date,
    MIN(_loaded_at)      AS first_load_at
  FROM analytics.fct_orders
  WHERE _loaded_at >= date_sub(current_date(), 91)
  GROUP BY 1
),
joined AS (
  SELECT
    d.load_date,
    hour(a.first_load_at) * 60 + minute(a.first_load_at) AS arrival_minute
  FROM days d
  LEFT JOIN arrivals a ON a.load_date = d.load_date
)
SELECT
  count(*)                                     AS days_in_window,
  count(arrival_minute)                        AS days_with_a_load,
  percentile(arrival_minute, 0.50)             AS p50_minute,
  percentile(arrival_minute, 0.95)             AS p95_minute,
  percentile(arrival_minute, 0.99)             AS p99_minute,
  max(arrival_minute)                          AS worst_minute,
  count_if(arrival_minute <= 8 * 60) / count(*) AS on_time_rate_0800
FROM joined;

Two notes before you trust the output. First, HOUR() reads the timestamp in whatever zone it's stored in. If _loaded_at is UTC and your consumers are in New York, convert first with CONVERT_TIMEZONE in Snowflake or from_utc_timestamp in Databricks, or your deadline is off by four or five hours. Second, a load that finishes just after midnight lands on the next calendar day. If your batch straddles midnight, shift the timestamp by a few hours before taking the date.

The percentiles ignore missed days, because a missed day has no arrival minute. The on-time rate doesn't: a missed day sits in the denominator as a failure. That's deliberate. Percentiles describe a normal day; the on-time rate is what you'll actually be graded on.

Here's what a typical result looks like and how to read it:

Metric Value Clock time
days_in_window 90
days_with_a_load 87 3 days never loaded
p50_minute 340 05:40
p95_minute 415 06:55
p99_minute 460 07:40
worst_minute 670 11:10
on_time_rate_0800 0.933 84 of 90 days

The consumer asked for "fresh by 8am, every day." History says 08:00 is met on 93.3% of days. Promising 99% at 08:00 would be fiction, and the three days that never loaded at all would break it inside a single quarter.

You have three honest options:

  • Promise what history supports. "By 08:00 on 93% of days." Accurate, and uncomfortable to say out loud, which is useful pressure.
  • Move the deadline. p99 is 07:40 on days that loaded, so the lateness on normal days is small. The problem is the three missed days, and no deadline fixes those.
  • Fix the pipeline first, then promise. The three missed days are where the 6.7% went. Find out why they didn't load. Usually it's one recurring cause, like an upstream export that skips holidays or a credential that rotates monthly.

Option three is almost always right, and the query is what tells you so. Without it, you'd have written "99%" and found out in March.

The rule I use: the SLA deadline should sit at or after p99 on loaded days, the SLO deadline around p95, and the target percentage should be at least 2 points below the measured on-time rate until you've fixed the dominant cause of misses. Promise less than you deliver, then tighten.

What is a data error budget and how do you calculate one?

An error budget is the amount of failure your target allows over a measurement window, expressed as something you can count and spend. It turns "95%" from an abstraction into "we can be late once this month and it's fine."

The formula:

error budget = (1 - target) x periods in window

daily table,  95% target, 30-day window  -> 0.05 x 30  = 1.5 late days
daily table,  99% target, 90-day window  -> 0.01 x 90  = 0.9 late days
hourly table, 99% target, 30-day window  -> 0.01 x 720 = 7.2 late hours

For daily batch tables, count the budget in late periods, not minutes. A table that's 3 minutes late and one that's 6 hours late both missed the deadline, and treating them differently in the budget invites arguments about whether 3 minutes "really counts." It counts. Severity belongs in the postmortem, not the ledger.

Target Late days allowed per 30 days Late days allowed per quarter Realistic for
90% 3 9 New pipelines, external vendor feeds
95% 1.5 4.5 Most daily dashboards
97% 0.9 2.7 Executive reporting with a stable pipeline
99% 0.3 0.9 Customer-facing or regulatory, with on-call
99.9% 0.03 0.09 Almost nothing in batch analytics

Look at the 99% row for a daily table. Less than one late day per quarter. That's a pipeline with on-call, retries, and upstream dependencies you control. If any source in the chain is a SaaS API you pull through a connector, you don't control it, and 99% is a promise somebody else gets to break.

Here's the burn query. It's written to run unchanged on both Snowflake and Databricks, since HOUR, MINUTE, DATE_TRUNC, and COUNT_IF exist in both:

-- Error budget burn for the current month (Snowflake and Databricks)
WITH arrivals AS (
  SELECT
    DATE_TRUNC('DAY', _loaded_at) AS load_date,
    MIN(_loaded_at)               AS first_load_at
  FROM analytics.fct_orders
  WHERE _loaded_at >= DATE_TRUNC('MONTH', CURRENT_DATE())
  GROUP BY 1
)
SELECT
  COUNT(*)                                                         AS days_loaded,
  COUNT_IF(HOUR(first_load_at) * 60 + MINUTE(first_load_at) > 480) AS days_late,
  0.05 * 30                                                        AS budget_days,
  COUNT_IF(HOUR(first_load_at) * 60 + MINUTE(first_load_at) > 480)
    / (0.05 * 30)                                                  AS budget_burned
FROM arrivals;

This one skips the calendar join for brevity, so add days that never loaded to days_late by hand, or reuse the days CTE from the earlier query. A budget_burned above 1.0 means the budget is gone.

What should happen when the error budget is blown?

Something specific and agreed in advance, written into the SLA itself. A budget with no policy attached is a dashboard number nobody acts on, and the point of the budget is to make the decision before the argument starts.

Budget state What it means Action
Under 50% burned Normal operation Nothing. Ship features.
50 to 100% burned One more bad week breaks the SLA Every miss gets a written cause. No risky changes to this pipeline without a rollback plan.
Over 100% burned The SLA is broken this window Reliability work on this pipeline takes priority over new work until the window recovers. Tell the consumer before they ask.
Over 100% for 3 windows running The target is wrong or the pipeline is Renegotiate the target with the consumer, or fund the fix. Pick one.

Two positions I'd defend here.

A blown budget is information, not a performance review. If missing the SLA gets someone blamed, people stop measuring honestly. The first time a team quietly excludes a late day as "infrastructure, not us," the SLA is dead and the numbers keep looking fine.

A budget that's never touched is also a problem. If you've hit 100% for four straight quarters against a 95% target, you're either over-investing in that pipeline or under-measuring it. Check the measurement first. Then consider tightening the SLA, since your consumers are getting more reliability than they were promised and might plan around more.

How does a data SLA relate to data downtime?

An SLA defines which downtime counts. Data downtime measures the total time data is missing or wrong, broken into time to detect and time to resolve. The SLA draws the line that turns "late" into "down": with an 08:00 deadline, a table landing at 08:40 has 40 minutes of downtime, and one landing at 07:55 has none, even though it was slower than usual.

Detection time is where SLAs most often fail without anyone knowing. If your freshness check runs once an hour and the deadline is 08:00, a miss might not be detected until 08:59. The consumer notices at 08:05. Check frequency for an SLA'd table should be well under the warning you want, which is the argument for an SLO an hour ahead of the SLA plus a check every 10 to 15 minutes around the deadline.

What goes in a data SLA? A fill-in template

Here's the template I'd use. I call it the five-field SLA card, after the five fields that make an SLA keepable: deadline, indicator, owner, tolerance, and escalation. If any of those five is blank, you don't have an SLA yet. Everything else on the card is context.

# Data SLA card. One per dataset that a consumer depends on.
dataset:      analytics.fct_revenue        # the table the consumer reads
consumer:     Finance, daily revenue report
use:          CFO dashboard, reviewed 08:30 Mon to Fri

# D: deadline
deadline:     "08:00 America/New_York"
calendar:     business days                 # or: every day

# I: indicator
indicator:    freshness_lag
measured_by:  MIN(_loaded_at) per day, first load after 00:00 local
measured_at:  analytics.fct_revenue         # last hop, not the raw table

# O: owner
owner:        data-platform on-call
backup:       analytics-eng lead

# T: tolerance
target:       95% of periods on time
window:       rolling 90 days, reported monthly
error_budget: 4.5 late days per quarter
slo:          "07:00, 98%"                  # internal, tighter than the SLA
history:      93.3% on time at 08:00 over last 90 days (query: sla_history.sql)

# E: escalation
on_miss:      post in #finance-data by 08:15 with cause and ETA
budget_50:    written cause for every further miss
budget_100:   reliability work takes priority; consumer notified
budget_3x:    renegotiate target or fund fix

exclusions:
  - announced warehouse maintenance, 48h notice
  - upstream source outage confirmed by vendor status page
review:       quarterly, next 2027-03-01

A few notes on the fields people get wrong.

history is mandatory. If you can't fill it in, you haven't run the query, and the target is a guess. Writing the measured on-time rate next to the promise keeps everyone honest about the gap between them.

exclusions should be short and external. "Upstream vendor outage" is reasonable, because you can't fix it and you can point to evidence. "Pipeline failures" is not an exclusion, it's the thing the SLA exists to measure. Every exclusion you add makes the number look better and mean less.

measured_at names a table, not a job. This is the field that catches the "the DAG succeeded" trap before it happens.

review has a date. SLAs drift. The consumer's meeting moves to 09:00, a new source gets added, the warehouse gets resized. Without a review date, the card goes stale while still looking authoritative.

How do you monitor a data SLA without building a platform?

The measurement can be a scheduled query. Run the history query weekly and the burn query daily, write results to a small table, and post the burn number to the channel where the owner will see it. That's maybe an afternoon of work and covers a handful of SLAs fine.

What it doesn't give you is detection. A daily burn query tells you after the fact that yesterday was late. To catch the miss before the consumer does, you need a freshness check running against the deadline, which is where dbt's source freshness command (with loaded_at_field, warn_after, and error_after) or a monitoring tool comes in. dbt's version is a check that runs when you invoke it. It won't keep the ledger of misses for you, so you still need the burn query.

Here's how this maps onto what we built in AnomalyArmor, including where it stops.

Per-table thresholds come from one of three sources. You can set an explicit SLA in hours with an expected update time and frequency (hourly, daily, weekdays, or weekly). Or, in auto-learn mode, the system looks at up to 30 days of observed updates and, once it has at least 10 samples and a pattern confidence of 75% or more, sets the threshold at the average update interval times 1.08. Before that, it falls back to the check interval as the threshold.

The check is binary. A table is compliant or in violation. There's no warning tier at the freshness layer. When a violation is recorded it stores hours overdue and "intervals overdue," which is hours overdue divided by the threshold, and the Slack alert shows that ratio. A table 2 hours late on a 1-hour threshold reads as 2.0 intervals, which is a quicker severity signal than raw hours.

One open violation per table, and a one-hour notification cooldown. A table that stays stale doesn't produce a new violation every check, and notifications for a schedule are limited to one per hour. Acknowledging a violation requires picking a root cause from a fixed list (source issue, pipeline failure, schema change, configuration error, infrastructure, known maintenance, business process change, other). That list is a decent starting taxonomy for your postmortems even if you never use the product.

What it doesn't do: error budgets. There's a compliance report endpoint that returns total violations, how many were acknowledged, and average and maximum hours overdue over a window. A comment in the code says it plainly: that's an acknowledgment rate, not an SLA compliance rate, because it doesn't divide by total periods. So the burn query above is still your job. That's an honest gap, and I'd rather you know it before you rely on the number.

A design choice worth disagreeing with. The learned threshold uses the mean interval, not a percentile. For tables that update like clockwork that's fine, and the 1.08 multiplier gives roughly 2 hours of slack on a 24-hour table. For a table whose arrival time wanders, a mean-based threshold will fire on ordinary slow days. If you're writing a formal SLA, set the explicit threshold from your p99 instead of relying on the learned one.

One thing a freshness threshold can't do is tell you why 30 tables went late at once. That's a correlation problem, and it's worth solving before you wire SLA alerts to a pager, or one upstream failure will page you once per SLA'd table.

What mistakes make a data SLA impossible to keep?

Three that the sections above don't already cover.

SLAs on the wrong table. The SLA covers the raw load, the consumer reads a mart three hops down. Every transformation in between is unmeasured risk. Use the blast radius of the source to see which consumer-facing tables actually depend on it, and put the SLA there.

Deadlines picked from a meeting, not from data. The consumer's 08:00 is a real need. Whether you can meet it is an empirical question, and the history query answers it in under a minute.

Exclusions that swallow the SLA. If "upstream issues" is an exclusion and every miss turns out to be upstream, the SLA measures nothing. Keep exclusions to things with external evidence.

Frequently asked questions

What is a data SLA?

A data SLA is a commitment to a named consumer that a dataset will meet a measurable condition, usually arriving by a deadline, on a stated percentage of periods. A real one names the indicator, the target, the measurement window, the owner, and what happens when it's missed.

What is the difference between a data SLA and a data SLO?

An SLO is your internal target, and an SLA is the external promise to a consumer. The SLO should be tighter, such as 07:00 against an 08:00 SLA, so you get warning and a chance to fix things before the promise breaks.

What is an SLI in data engineering?

An SLI, or service level indicator, is the specific quantity you measure, such as the minute a table finished loading each day or the share of expected rows that arrived. The SLO and SLA are both targets set on an SLI.

What is a freshness SLA?

A freshness SLA promises that a table will be updated by a deadline, or within a maximum age, on a stated share of periods. "Loaded by 08:00 on 95% of business days" is a freshness SLA. "Always fresh" isn't, because it has no measurement and no tolerance.

How do I calculate the right SLA target?

Run 90 days of arrival history, join it against a calendar so missed days count as late, and compute the on-time rate at the consumer's deadline. Set the target at least 2 points below that measured rate, and fix the dominant cause of misses before tightening it.

What is a data error budget?

The number of failures a target allows over a window, calculated as (1 minus target) times periods. A 95% target on a daily table over 30 days allows 1.5 late days. It turns a percentage into something a team can count and spend.

What should happen when an error budget is exhausted?

Whatever the SLA says, decided in advance. A sensible default is that reliability work on that pipeline takes priority over new features until the window recovers, and the consumer hears about it from you before they notice.

Should I use p95 or p99 for an SLA deadline?

Put the SLA deadline at or after p99 on days that loaded, and the internal SLO around p95. A p95 deadline means you'll miss about 1 day in 20 from ordinary variation alone, before any real failures.

Why shouldn't I measure freshness with MAX(updated_at)?

Because business timestamps reflect customer activity, not pipeline health. A quiet weekend looks stale when the load ran fine. Use a load timestamp like _loaded_at or the orchestrator's completion time.

How many data SLAs should a team have?

Few. Formal SLAs fit the 5 to 10 datasets that feed finance, executives, customers, or regulators. Run the rest on internal SLOs with no external promise, so the commitments you do make get real attention.

Can dbt source freshness enforce a data SLA?

It can detect a breach when you run it, using loaded_at_field with warn_after and error_after thresholds. It doesn't keep a history of misses or track an error budget, so you still need something that records each period's result.

Does AnomalyArmor track data SLA error budgets?

No. It sets per-table freshness thresholds (explicit, learned from history, or defaulting to the check interval), records violations with hours and intervals overdue, and reports violation and acknowledgment counts. It doesn't compute a compliance rate over total periods, so the burn calculation is still yours.