Skip to content

Commit

Permalink
replace TUM with snapshot (#1749)
Browse files Browse the repository at this point in the history
* add: static TUM snapshot as source

* fix: use TUM snapshot instead of live data

* fix: linting error
  • Loading branch information
ccerv1 authored Jul 3, 2024
1 parent 4c2f2c7 commit 24ad6ff
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ artifacts as (
from {{ ref('artifacts_v1') }}
),

{# use snapshot instead of live model as farcaster addresses may change #}
rf4_trusted_users as (
select
address,
true as is_trusted_user
from {{ source('static_data_sources', 'op_rf4_trusted_addresses') }}
),

events_to_project as (
select
events.bucket_day,
Expand All @@ -59,7 +67,7 @@ events_to_project as (
on events.from_artifact_id = from_artifacts.artifact_id
left join {{ ref('projects_v1') }}
on events.project_id = projects_v1.project_id
left join {{ ref('rf4_trusted_users') }}
left join rf4_trusted_users
on from_artifacts.artifact_name = rf4_trusted_users.address
where events.amount > 0
),
Expand Down
2 changes: 2 additions & 0 deletions warehouse/dbt/models/static_data_sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ sources:
database: opensource-observer
schema: static_data_sources
tables:
- name: op_rf4_trusted_addresses
identifier: op_rf4_trusted_addresses
- name: optimist_nft_holders
identifier: optimist_nft_holders
- name: agora_rf4_applications
Expand Down

0 comments on commit 24ad6ff

Please sign in to comment.