# Model and transform data

Use [views and macros](/docs/lakehouse/features.md) to reuse SQL logic. Use [dbt](/docs/lakehouse/modeling/dbt.md) to run versioned models and tests against Altertable.

Connecting a dbt repository as [business context](/docs/agents/knowledge.md) makes definitions and metadata available to agents. Repository sync does not execute the models.

- [Medallion architecture with dbt](/docs/lakehouse/modeling/medallion-architecture.md): Turn raw data accessed through Altertable federation into tested, business-ready tables with dbt, reusable business rules, and marts your teams can rely on.
- [dbt](/docs/lakehouse/modeling/dbt.md): Run dbt models on Altertable and sync project knowledge, lineage, and semantic metadata from a connected repository.