---
title: "Publish only tables that pass their tests · Agent Wranglers"
url: https://agentwranglers.se/playbook/data-engineering/data-quality-tests/write-audit-publish
id: DEN-15
level: Recommended
updated: 2026-10-22
tokens: 550
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Publish only tables that pass their tests

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-22.

- ID: DEN-15
- Level: Recommended
- Chapter: [Data quality tests](https://agentwranglers.se/playbook/data-engineering/data-quality-tests.md)
- Rule: Build each table where no dashboard reads it, run its tests, and swap it in only when they pass. When a test fails, dashboards keep the last good version.
- Check: Break a model on staging so that a blocking test fails. The dashboard still shows the previous numbers, and an alert names the failed test.
- How: This pattern is called write, audit, publish. Build into a staging schema or a branch and run the tests from [Test the keys and values of every model](https://agentwranglers.se/playbook/data-engineering/data-quality-tests/model-tests.md). Then swap with one rename or view change. Tests that run after publishing find bad numbers people have already seen. Write next to each test whether a failure blocks the swap or only warns.

## Related rules

- DEN-14 [Test the keys and values of every model](https://agentwranglers.se/playbook/data-engineering/data-quality-tests/model-tests.md) in Data engineering

**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/write-audit-publish">Agent Wranglers data engineering playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Test the keys and values of every model](https://agentwranglers.se/playbook/data-engineering/data-quality-tests/model-tests.md)
- Next: [Alert when data arrives late](https://agentwranglers.se/playbook/data-engineering/data-quality-tests/freshness-limits.md)
- [Data quality tests](https://agentwranglers.se/playbook/data-engineering/data-quality-tests.md)
