---
title: "Publish a service level for every shared · Agent Wranglers"
url: https://agentwranglers.se/playbook/data-engineering/data-quality-tests/table-service-levels
id: DEN-40
level: Recommended
updated: 2026-10-27
build: a2a6bdfed830
tokens: 1063
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Publish a service level for every shared table

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Data quality tests](https://agentwranglers.se/playbook/data-engineering/data-quality-tests.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-27.

- ID: DEN-40
- Level: Recommended
- Chapter: [Data quality tests](https://agentwranglers.se/playbook/data-engineering/data-quality-tests.md)
- Rule: For each table that dashboards or other teams read, publish targets for freshness and for passing tests, measured over 28 days. Report each table against its targets every month.
- Check: Every table with a reader outside its team has freshness and test targets in its metadata. A monthly report lists each such table with its measured share for the last 28 days, and the report from last month exists.
- How: An alert says that one load is late. A service level says how often the table met its promise, so its readers can trust it or plan around it. Pick one target per kind, such as fresh within its limit in 99 percent of hours and blocking tests passed on 99 percent of days. Take the freshness limit from [Alert when data arrives late](https://agentwranglers.se/playbook/data-engineering/data-quality-tests/freshness-limits.md). Store the targets with the table's owner from [Give every table an owner and a description](https://agentwranglers.se/playbook/data-engineering/warehouse-and-models/table-owners.md). Targets work as [Set a target for each indicator](https://agentwranglers.se/playbook/operations/service-levels/service-level-objectives.md) describes for services. When a table misses its target, its owner pauses changes to it and fixes the cause first, as [Spend the error budget on purpose](https://agentwranglers.se/playbook/operations/service-levels/error-budget.md) does.

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### Python example

```python
def freshness_share(hourly_ages_minutes: list[int], limit_minutes: int) -> float:
    on_time = sum(1 for age in hourly_ages_minutes if age <= limit_minutes)
    return on_time / len(hourly_ages_minutes)

def meets_target(hourly_ages_minutes: list[int], limit_minutes: int, target: float = 0.99) -> bool:
    return freshness_share(hourly_ages_minutes, limit_minutes) >= target
```

### JavaScript example

```js
export const freshnessShare = (hourlyAgesMinutes, limitMinutes) =>
  hourlyAgesMinutes.filter(age => age <= limitMinutes).length / hourlyAgesMinutes.length;

export const meetsTarget = (hourlyAgesMinutes, limitMinutes, target = 0.99) =>
  freshnessShare(hourlyAgesMinutes, limitMinutes) >= target;
```

## Sources

- [dbt freshness](https://docs.getdbt.com/reference/resource-configs/freshness)

## Related rules

- DEN-16 [Alert when data arrives late](https://agentwranglers.se/playbook/data-engineering/data-quality-tests/freshness-limits.md) in Data engineering
- DEN-4 [Give every table an owner and a description](https://agentwranglers.se/playbook/data-engineering/warehouse-and-models/table-owners.md) in Data engineering
- OPS-2 [Set a target for each indicator](https://agentwranglers.se/playbook/operations/service-levels/service-level-objectives.md) in Operations and observability
- OPS-3 [Spend the error budget on purpose](https://agentwranglers.se/playbook/operations/service-levels/error-budget.md) in Operations and observability

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/data-engineering/data-quality-tests/table-service-levels">Agent Wranglers data engineering playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Unit test model logic with fixed rows](https://agentwranglers.se/playbook/data-engineering/data-quality-tests/model-unit-tests.md)
- [Data quality tests](https://agentwranglers.se/playbook/data-engineering/data-quality-tests.md)
