Skip to content

The dbt project have some error #15

@bytepure

Description

@bytepure

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

  1. In different model.sql, if CTEs name are some, in draw it will be one CTE
  2. 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
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions