Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replacing old Axelar data with Axelarscan data #463

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions models/projects/axelar/core/ez_axelar_metrics.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ with
select
date
, txns
, daa as dau
from {{ ref("fact_axelar_daa_txns") }}
, dau
, fees
from {{ ref("fact_axelar_crosschain_dau_txns_fees_volume") }}
)
, github_data as ({{ get_github_metrics("Axelar Network") }})
, price_data as ({{ get_coingecko_metrics("axelar") }})
Expand All @@ -23,6 +24,7 @@ select
, 'axelar' as chain
, txns
, dau
, fees
, weekly_commits_core_ecosystem
, weekly_commits_sub_ecosystem
, weekly_developers_core_ecosystem
Expand Down
6 changes: 6 additions & 0 deletions models/staging/axelar/__axelar__sources.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
sources:
- name: PROD_LANDING
schema: PROD_LANDING
database: LANDING_DATABASE
tables:
- name: raw_axelar_dau_txns_volume_fees
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
with
max_extraction as (
select max(extraction_date) as max_date
from {{ source("PROD_LANDING", "raw_axelar_dau_txns_volume_fees") }}
)
,latest_data as (
select
date(value:timestamp) as date
, value:users::number as dau
, value:fee::number as fees
, value:num_txs::number as txns
, value:volume::number as volume
from {{ source("PROD_LANDING", "raw_axelar_dau_txns_volume_fees") }},
lateral flatten(input => parse_json(source_json):data)
where extraction_date = (select max_date from max_extraction)
and value:timestamp <> 0
)
select
date
, dau
, fees
, txns
, volume
, 'axelar' as chain
, 'axelar' as app
from latest_data
Loading