---
title: "Build every warehouse table from reviewed · Agent Wranglers"
url: https://agentwranglers.se/playbook/data-engineering/warehouse-and-models/transformations-as-code
id: DEN-3
level: Recommended
updated: 2026-10-22
tokens: 634
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Build every warehouse table from reviewed code

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

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

- ID: DEN-3
- Level: Recommended
- Chapter: [Warehouse and models](https://agentwranglers.se/playbook/data-engineering/warehouse-and-models.md)
- Rule: Write every table the warehouse builds as SQL or code in version control, reviewed and deployed by CI. No shared table is built from a saved query in a BI tool or a notebook.
- Check: A script compares the warehouse's list of shared tables with the model files in the repository and fails on any table without a model. Only the deploy job's account can create tables in shared schemas.
- How: A table built by hand cannot be rebuilt, reviewed or traced. A transformation tool such as dbt or SQLMesh does this, or a folder of SQL files run in order. CI builds the changed models and runs their tests on every pull request, as [Run the checks on every change](https://agentwranglers.se/playbook/engineering/version-control-and-review/continuous-integration.md) says. Metrics follow [Define each metric once](https://agentwranglers.se/playbook/data/product-analytics/metric-definitions.md).

## Related rules

- ENG-16 [Run the checks on every change](https://agentwranglers.se/playbook/engineering/version-control-and-review/continuous-integration.md) in Engineering
- DAT-53 [Define each metric once](https://agentwranglers.se/playbook/data/product-analytics/metric-definitions.md) in Data and databases

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

- Previous: [Land raw data unchanged and build tables in layers](https://agentwranglers.se/playbook/data-engineering/warehouse-and-models/raw-then-models.md)
- Next: [Give every table an owner and a description](https://agentwranglers.se/playbook/data-engineering/warehouse-and-models/table-owners.md)
- [Warehouse and models](https://agentwranglers.se/playbook/data-engineering/warehouse-and-models.md)
