From e94b400541daa48a1656ea88f0bf7c1eb1427cd9 Mon Sep 17 00:00:00 2001 From: Leopoldo Araujo <68853890+poloaraujo@users.noreply.github.com> Date: Fri, 30 Aug 2024 14:21:45 -0400 Subject: [PATCH] Changed single select lines --- models/dim_dbt__current_models.sql | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/models/dim_dbt__current_models.sql b/models/dim_dbt__current_models.sql index d63ab5b3..3e24ae79 100644 --- a/models/dim_dbt__current_models.sql +++ b/models/dim_dbt__current_models.sql @@ -1,25 +1,20 @@ with base as ( - select - * - from {{ ref('stg_dbt__models') }} + select * from {{ ref('stg_dbt__models') }} ) , model_executions as ( - select - * - from {{ ref('stg_dbt__model_executions') }} + select * from {{ ref('stg_dbt__model_executions') }} ) , latest_models as ( /* Retrieves the models present in the most recent run */ - select - * + select * from base where run_started_at = (select max(run_started_at) from base)