# Issue Build models on top of other models from dbt-fundamentals

**URL:** <https://discourse.getdbt.com/t/issue-build-models-on-top-of-other-models-from-dbt-fundamentals/8076>\
**Category:** Help\
**Tags:** dbt-cloud\
**Created:** [April 28, 2023, 3:59pm UTC](https://discourse.getdbt.com/t/issue-build-models-on-top-of-other-models-from-dbt-fundamentals/8076 "2023-04-28T15:59:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![JimRyan2021](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/jimryan2021/32/1897_2.png) [@JimRyan2021](https://discourse.getdbt.com/u/JimRyan2021)\
**Post date:** [April 28, 2023, 3:59pm UTC](https://discourse.getdbt.com/t/issue-build-models-on-top-of-other-models-from-dbt-fundamentals/8076/1 "2023-04-28T15:59:18Z")

</div>

I have having an issue when trying to build a model on top of another model. I am new to dbt so I am following the instructions from the quick start documentation. Gere is a link to the doc.[dbt docs](https://docs.getdbt.com/docs/quickstarts/dbt-cloud/snowflake#load-data)

What I did was I created 2 queries ran them and they ran fine and this is supposed to create 2 separate views. Then they had me change the customer.sql to a cte - like this:

````plaintext

    select * from {{ ref('stg_customers') }}

),

orders as (

    select * from {{ ref('stg_orders') }}

),

customer_orders as (

    select
        customer_id,

        min(order_date) as first_order_date,
        max(order_date) as most_recent_order_date,
        count(order_id) as number_of_orders

    from orders

    group by 1

),

final as (

    select
        customers.customer_id,
        customers.first_name,
        customers.last_name,
        customer_orders.first_order_date,
        customer_orders.most_recent_order_date,
        coalesce(customer_orders.number_of_orders, 0) as number_of_orders

    from customers

    left join customer_orders using (customer_id)

)

select * from final```

and when I run it I get an error about and uncaught python exception:
Here is what the log says:

14:50:05 checksum: 0325e47f1211ebbdb24627f81d8289d705fdb573380364d07ab35982cb3d57cd, vars: {}, profile: None, target: None, version: 1.4.6
14:50:05 Unable to do partial parsing because config vars, config profile, or config target have changed
14:50:05 previous checksum: 0049c9ca814b191acba678e7b1a0d7a85eeac3e13700309cfc1ce1a2c78d3886, current checksum: 0325e47f1211ebbdb24627f81d8289d705fdb573380364d07ab35982cb3d57cd
14:50:05 Sending event: {'category': 'dbt', 'action': 'partial_parser', 'label': '334d58a9-435d-4e78-bfdf-a268dede3991', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x7f48528668e0>]}
14:50:06 1699: static parser successfully parsed stg_customers.sql
14:50:06 1699: static parser successfully parsed stg_orders.sql
14:50:06 Sending event: {'category': 'dbt', 'action': 'load_project', 'label': '334d58a9-435d-4e78-bfdf-a268dede3991', 'context': [<snowplow_tracker.self_describing_json.SelfDescribingJson object at 0x7f4851e56cd0>]}
uncaught python exception
''
````
