Projects

Related reference docs

Getting started

A dbt project is a directory of .sql and .yml files, which dbt uses to transform your data. At a minimum, a dbt project must contain:

  • A project file: A dbt_project.yml file tells dbt that a particular directory is a dbt project, and also contains configurations for your project.
  • Models: A model 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 may also contain a number of other resources, such as snapshots, seeds, tests, macros, documentation, and sources.

Creating a dbt project

Creating your first dbt project

If you're new to dbt, we recommend that you check out our Getting Started Tutorial to build your first dbt project.

If you don't yet have a dbt project, follow these instructions to create one. The dbt starter project contains default configurations as well as helpful notes.

To create a new dbt project when developing in dbt Cloud:

  1. Create a dbt Cloud account here. If your organization already has a dbt Cloud account, ask an admin to add you as a Developer.
  2. If you created a new account, a new project should automatically be created. If you were added to an existing account:
    • Click the hamburger menu, then Account Settings, then Projects.
    • Name your project, and click Save. There's no need to fill in the other details.
    • Click the hamburger menu, and then Home.
    • Switch the project in the header bar to your new "dbt Tutorial" project.
  3. Complete the project setup flow:
    • Connect to your data warehouse
    • Add a repository — either choose a managed repository, or connect to an existing, but bare, repository.
dbt Cloud Project Setup flow

dbt Cloud Project Setup flow

  1. Go to the Develop interface by either:
    • Selecting Start Developing, or
    • Selecting the hamburger menu, and then Develop.
  2. Select Initialize a project to create your project. You should see a directory structure with .sql and .yml files that were generated by the init command.

FAQs

 What should I name my dbt project?
 How should I structure my project?

Using an existing project

If your organization already has a dbt Cloud account, and you wish to develop your project using dbt Cloud, ask an admin to add you as a Developer.