From 4b7db2ad532489443bff7257b55e6231098bc6ad Mon Sep 17 00:00:00 2001 From: anandgupta42 Date: Wed, 25 Mar 2026 09:02:19 -0700 Subject: [PATCH] refactor: inline CTE in fct_orders --- models/marts/fct_orders.sql | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/models/marts/fct_orders.sql b/models/marts/fct_orders.sql index f336031..75d77b0 100644 --- a/models/marts/fct_orders.sql +++ b/models/marts/fct_orders.sql @@ -1,6 +1,4 @@ -with orders as ( - - select * from {{ ref('stg_orders') }} +with }} ), @@ -38,7 +36,7 @@ final as ( else false end as is_cancelled - from orders o + from (select * from {{ ref('stg_orders') }}) as orders o left join order_metrics om on o.order_id = om.order_id )