Skip to content

Commit

Permalink
adapt prepared staging layer for greenplum
Browse files Browse the repository at this point in the history
  • Loading branch information
kzzzr committed Oct 12, 2021
1 parent dfc5866 commit a97a224
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions models/stage/v_stg_inventory.sql
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,6 @@ WITH staging AS (
)

SELECT *,
TO_DATE('{{ var('load_date') }}') AS LOAD_DATE,
TO_DATE('{{ var('load_date') }}') AS EFFECTIVE_FROM
('{{ var('load_date') }}')::DATE AS LOAD_DATE,
('{{ var('load_date') }}')::DATE AS EFFECTIVE_FROM
FROM staging
2 changes: 1 addition & 1 deletion models/stage/v_stg_orders.sql
Original file line number Diff line number Diff line change
Expand Up @@ -106,5 +106,5 @@ WITH staging AS (
)

SELECT *,
TO_DATE('{{ var('load_date') }}') AS LOAD_DATE
('{{ var('load_date') }}')::DATE AS LOAD_DATE
FROM staging
2 changes: 1 addition & 1 deletion models/stage/v_stg_transactions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
source_model: 'raw_transactions'
derived_columns:
RECORD_SOURCE: '!RAW_TRANSACTIONS'
LOAD_DATE: DATEADD(DAY, 1, TRANSACTION_DATE)
LOAD_DATE: (TRANSACTION_DATE + 1 * INTERVAL '1 day')
EFFECTIVE_FROM: 'TRANSACTION_DATE'
hashed_columns:
TRANSACTION_PK:
Expand Down

0 comments on commit a97a224

Please sign in to comment.