dbt - Documentation

Create a project

Getting started

Creating a dbt project

To create your first dbt project, run:

$ dbt init [project-name]

This will create a new directory in your current path (i.e. at ./[project-name]) with a starter project. The starter project contains default configurations as well as helpful notes to get you started.

Understanding projects

What is a dbt project?

A project is a directory of .sql and .yml files. The directory must contain at a minimum:

  • Models: A model - model - A `model` is a single SQL file containing a single _select_ statement that either transforms raw data into a dataset that is ready for analytics, or, more often, is an intermediate step in such a transformation. is a single .sql file. Each model contains a single select statement that either transforms raw data into a dataset that is ready for analytics, or, more often, is an intermediate step in such a transformation.
  • A project file: a dbt_project.yml file which specifies how dbt operates on your project.

How should I structure my dbt project?

How you structure your dbt project is up to you! If you're just getting started, check out our guide on how we structure our projects, and check out our demonstration project.


What's Next

Next, let's configure your dbt installation to connect to your warehouse.

Configure your profile

Create a project


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.