From 293cf27def5f13e13ef17c6713417cebd8728f9b Mon Sep 17 00:00:00 2001 From: Taylor Dunlap Date: Wed, 23 Aug 2023 23:31:28 +0000 Subject: [PATCH] getting project to work --- .../materialization_incremental.sql | 32 ------------------- .../python/forecast_daily_returns.py | 2 +- models/staging/tpch/stg_tpch_customers.sql | 7 ---- 3 files changed, 1 insertion(+), 40 deletions(-) delete mode 100644 models/demo_examples/materialization_incremental.sql diff --git a/models/demo_examples/materialization_incremental.sql b/models/demo_examples/materialization_incremental.sql deleted file mode 100644 index 024a433..0000000 --- a/models/demo_examples/materialization_incremental.sql +++ /dev/null @@ -1,32 +0,0 @@ -{{ config(materialized='incremental') }} - -with source as ( - - select * from {{ source('tpch', 'customer') }} - -), - - -renamed as ( - - select - c_custkey as customer_key, - c_name as name, - c_address as address, - c_nationkey as nation_key, - c_phone as phone_number, - c_acctbal as account_balance, - c_mktsegment as market_segment, - c_comment as comment - - from source - -) - -select * from renamed - -{% if is_incremental() %} - -- this filter will only be applied on an incremental run - where customer_key not in (select customer_key from {{this}} ) - -{% endif %} \ No newline at end of file diff --git a/models/demo_examples/python/forecast_daily_returns.py b/models/demo_examples/python/forecast_daily_returns.py index 07bc898..d09524f 100644 --- a/models/demo_examples/python/forecast_daily_returns.py +++ b/models/demo_examples/python/forecast_daily_returns.py @@ -5,7 +5,7 @@ def model( dbt, session ): dbt.config( materialized="table", - packages=['pandas','Prophet'] # how to import python libraries in dbt's context + packages=['pandas','Prophet','holidays==0.18'] # how to import python libraries in dbt's context ) # use historical data to fit model diff --git a/models/staging/tpch/stg_tpch_customers.sql b/models/staging/tpch/stg_tpch_customers.sql index 933324b..ffa7c9b 100644 --- a/models/staging/tpch/stg_tpch_customers.sql +++ b/models/staging/tpch/stg_tpch_customers.sql @@ -1,10 +1,3 @@ -{{ - config( - materialized='table' - ,post_hook="Select * from foobar" - ) -}} - with source as ( select * from {{ source('tpch', 'customer') }}