In dbt models, eg. change customers.sql the finel SELECT * FROM stg_customers is the final result of customers model
{{ config(materialized='view') }}
-- Staging model for raw customer data
-- Cleans and standardizes customer records from source
WITH
stg_customers AS (
SELECT
id AS customer_id,
LOWER(TRIM(first_name)) AS first_name,
LOWER(TRIM(last_name)) AS last_name,
first_name || ' ' || last_name AS full_name,
created_at
FROM {{ source('jaffle_shop', 'raw_customers') }}
)
SELECT * FROM stg_customers
There are 2 error
- In different model.sql, if CTEs name are some, in draw it will be one CTE
- The finel
SELECT * FROM stg_customers and other final result, in draw it will be one OUTPUT
Advice the model like below will be better

In dbt models, eg. change
customers.sqlthe finelSELECT * FROM stg_customersis the final result ofcustomersmodel{{ config(materialized='view') }} -- Staging model for raw customer data -- Cleans and standardizes customer records from source WITH stg_customers AS ( SELECT id AS customer_id, LOWER(TRIM(first_name)) AS first_name, LOWER(TRIM(last_name)) AS last_name, first_name || ' ' || last_name AS full_name, created_at FROM {{ source('jaffle_shop', 'raw_customers') }} ) SELECT * FROM stg_customersThere are 2 error
SELECT * FROM stg_customersand other final result, in draw it will be one OUTPUTAdvice the model like below will be better
