From 38f0477333025ce9db9f2b629c0850c94786be51 Mon Sep 17 00:00:00 2001 From: Alex Higgs Date: Sun, 30 Aug 2020 11:03:03 +0000 Subject: [PATCH] Fixed dates in staging --- dbt_project.yml | 2 +- models/stage/v_stg_inventory.sql | 4 ++-- models/stage/v_stg_orders.sql | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dbt_project.yml b/dbt_project.yml index 0c7a036..bb80bdf 100755 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,6 +1,6 @@ name: snowflakeDemo profile: snowflake-demo -version: '4.0' +version: '4.1' require-dbt-version: ['>=0.14.0', '<0.18.0'] config-version: 1 diff --git a/models/stage/v_stg_inventory.sql b/models/stage/v_stg_inventory.sql index c45df9b..d4111a9 100644 --- a/models/stage/v_stg_inventory.sql +++ b/models/stage/v_stg_inventory.sql @@ -7,6 +7,6 @@ WITH staging AS ( SELECT *, - {{ var('load_date') }} AS LOADDATE, - {{ var('load_date') }} AS EFFECTIVE_FROM + TO_DATE('{{ var('load_date') }}') AS LOADDATE, + TO_DATE('{{ var('load_date') }}') AS EFFECTIVE_FROM FROM staging \ No newline at end of file diff --git a/models/stage/v_stg_orders.sql b/models/stage/v_stg_orders.sql index c79648a..d0462fd 100644 --- a/models/stage/v_stg_orders.sql +++ b/models/stage/v_stg_orders.sql @@ -7,5 +7,5 @@ WITH staging AS ( SELECT *, - {{ var('load_date') }} AS LOADDATE + TO_DATE('{{ var('load_date') }}') AS LOADDATE FROM staging \ No newline at end of file