> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lightdash.com/llms.txt
> Use this file to discover all available pages before exploring further.

# dbt

> Connect a dbt project to Lightdash, keep it in sync, and use metrics defined in dbt

[dbt](https://docs.getdbt.com/docs/introduction?version=2) is the industry-standard tool for transforming data in your warehouse. You write modular transformations as plain SQL `select` statements, and dbt handles the dependencies between them, builds the resulting tables and views, and tests them.

Lightdash reads a connected dbt project and builds your [semantic layer](/semantic-layer) from it. Your dbt models define *what the tables are*; the Lightdash metadata in their YAML defines *what they mean* — which columns are dimensions, which aggregations are metrics, how models join.

dbt is not required. If you don't use it, define the same semantic layer in [Lightdash YAML](/semantic-layer/yaml) instead. This area covers the dbt integration itself: connecting a project, keeping it in sync, moving definitions between Lightdash and your repository, and what changes when you upgrade dbt.

For how to shape models so they explore well, see [modeling strategies](/semantic-layer/modeling-strategies).
