Skip to main content
This guide builds your first dbt™ model in the Code IDE, from a fresh branch to a table materialized in your warehouse.
PrerequisitesEstimated time: 10 minutes.

Steps

1

Create a branch

Keep main clean. Open source control (the left panel icon), and from the branch dropdown select + New branch, naming it something like my_first_dbt_model.
2

Create the model file

Open your project files (folder icon), right-click the target folder (for example models/staging), select New file, and name it descriptively (for example nba_player_info.sql).
3

Write the model

Write SQL that transforms your data, using dbt™ ref() and source() to reference other nodes:
4

Materialize it

In the Terminal, run:
Resolve any errors or warnings. You can also run models from the commands panel.
5

Commit and open a pull request

Commit and push with Git Lite, then open a pull request for review.
dbt run completes without errors and the model exists as a table or view in your development schema. Preview it in the Data Explorer to confirm the output.

Next steps

Explore data in the Code IDE

Preview compiled SQL and inspect results.

Build with DinoAI

Let the copilot generate models for you.