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

Converted Aptos data to incremental #403

Merged
merged 1 commit into from
Aug 15, 2024
Merged
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{ config(materialized="table") }}
{{ config(materialized="incremental", unique_key='date') }}
with
apt_prices as ({{ get_coingecko_price_with_latest("aptos") }}),
single_signed_transactions as (
Expand All @@ -8,6 +8,9 @@ with
tx_type = 'user_transaction'
and success = 'true'
and parse_json(signature):public_key is not null
{% if is_incremental() %}
and block_timestamp::date > (select dateadd('day', -3, max(date)) from {{ this }})
{% endif %}
),
primary_multi_signed_transactions as (
select
Expand All @@ -18,6 +21,9 @@ with
tx_type = 'user_transaction'
and success = 'true'
and parse_json(signature):sender is not null
{% if is_incremental() %}
and block_timestamp::date > (select dateadd('day', -3, max(date)) from {{ this }})
{% endif %}
),
raw_secondary_multi_signed_transactions as (
select
Expand All @@ -28,6 +34,9 @@ with
tx_type = 'user_transaction'
and success = 'true'
and parse_json(signature):secondary_signers is not null
{% if is_incremental() %}
and block_timestamp::date > (select dateadd('day', -3, max(date)) from {{ this }})
{% endif %}
),
secondary_multi_signed_transactions as (
select block_timestamp::date as date, value:"public_key" as signer
Expand Down Expand Up @@ -69,6 +78,9 @@ with
sum(gas_used * gas_unit_price) / 1E8 as gas
from aptos_flipside.core.fact_transactions
where tx_type = 'user_transaction'
{% if is_incremental() %}
and block_timestamp::date > (select dateadd('day', -3, max(date)) from {{ this }})
{% endif %}
group by block_timestamp::date
),
raw as (
Expand Down
Loading