Setup dbt Cloud Project

In this video, we will go through - setting up your dbt project - running and testing the sample models - see what it will look like to correct a broken test.

Summary of this video:

  1. Click on the hamburger menu and click on Develop to go to the IDE.
  2. To initialize the dbt project, click on the initialize your project.
  3. Take a look around the project after it is initialized. The dbt_project.yml is the key file that dbt looks for in order to understand that a directory is a dbt project.
  4. Next we are going to run the example dbt models by running the command dbt run on the command line.
  5. To run the tests on the models, run the command dbt test.
  6. To fix the failing model my_first_dbt_model, click on the model file and update the select statement from

    with source_data as (
        
    select 1 as id 
    union all 
    select null as id 
        
    )
    
    select * from source_data

to

with source_data as (
    
    select 1 as id 
    union all 
    select 2 as id 
    
)

select * from source_data
  1. To only rerun the previously broken model, run the command dbt run -m my_first_dbt_model
  2. To only rerun the previously failing test, run the command dbt test -m my_first_dbt_model
  3. Now let’s commit the work by clicking on the commit button on the left, provide a commit message setup dbt project, and click on Commit. This is the first and last time we will be committing directly to the master branch.