Skip to content

Commit

Permalink
trump/kamala 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
akan72 committed Aug 19, 2024
1 parent 1e977db commit be4b0d8
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions models/staging/drift/__drift__sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ sources:
database: LANDING_DATABASE
tables:
- name: raw_drift_trading_volume
- name: raw_drift_fill_price_kamala
- name: raw_drift_fill_price_trump
25 changes: 25 additions & 0 deletions models/staging/drift/raw_drift_prediction_markets.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{ config(materialized="table") }}
with
trump_data as (
select
DATE_TRUNC('DAY', extraction_date) as date,
source_json as trump_price
from {{ source("PROD_LANDING", "raw_drift_fill_price_trump") }}
), kamala_data as (
select
DATE_TRUNC('DAY', extraction_date) as date,
source_json as kamala_price
from {{ source("PROD_LANDING", "raw_drift_fill_price_kamala") }}
)

select
trump_data.date,
'drift' as app,
'DeFi' as category,
'solana' as chain,
trump_price,
kamala_price
from trump_data
left join kamala_data
on trump_data.date = kamala_data.date

0 comments on commit be4b0d8

Please sign in to comment.