How to Create Model in dbt?

Posted on by By admin, in DBT | 0

What is model in DBT

In dbt (data build tool), a model represents a logical transformation of raw data into a structured and analytically useful form. It consists of SQL queries that define how data from source tables or views should be selected, filtered, and aggregated to create a derived dataset. Models encapsulate the business logic necessary to generate meaningful insights and are designed to be modular, making them reusable and easy to maintain. By employing models, dbt enables a structured and version-controlled approach to data transformation, facilitating collaboration and ensuring the consistency and reliability of analytical outputs.

How To Create Models

Follow the below steps to create models in dbt UI (cloud)

  1. Log in to the DBT account. Click “Develop
  2. Find “models” folder in the project folders
  3. Click the … next to the models directory, then select Create file.
  4. Name the file filename.sql, then click Create.
  5. Write the transformation code / SQL and
    For eg –

    WITH raw_listings AS 
    SELECT id AS listing_id, 
    name AS listing_name, 
    price AS price_str, 
    FROM raw_listings
  6. Click save

How To Run The Model

dbt run” command is used to run the model code / SQL. In the command prompt, enter “dbt run” at the bottom. You should get a successful run and see themodels created.

In case if you have any queries please get us at

Thank You
Nikitha Rastapuram
Helical IT Solutions


Best Open Source Business Intelligence Software Helical Insight is Here


A Business Intelligence Framework

0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments