update/snapshot-cmt (#37)

This commit is contained in:
drethereum 2023-09-11 15:56:53 -06:00 committed by GitHub
parent 502010285c
commit 1c43dba0ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 9 deletions

View File

@ -1,10 +1,9 @@
{{ config(
materialized = 'incremental',
unique_key = 'proposal_id',
full_refresh = false,
tags = ['snapshot']
) }}
-- full_refresh = false,
-- backfill to complete in 24hrs
WITH requests AS ({% for item in range(6) %}
(

View File

@ -2,12 +2,11 @@
materialized = 'incremental',
incremental_strategy = 'delete+insert',
unique_key = 'space_id',
full_refresh = false,
tags = ['snapshot']
) }}
-- full_refresh = false,
-- after initial fill, reduce range to 6 and change orderDirection to desc
WITH requests AS ({% for item in range(32) %}
WITH requests AS ({% for item in range(6) %}
(
SELECT
@ -17,7 +16,7 @@ WITH requests AS ({% for item in range(32) %}
FROM
{{ source('crosschain_silver', 'apis_keys') }}
WHERE
api_name = 'snapshot') },{ 'query': 'query { spaces(orderBy: "created", orderDirection: asc, first: 1000, skip: ' || {{ item * 1000 }} || ') { id name about network symbol admins members categories domain private treasuries { address name network } verified } }' }) AS resp, SYSDATE() AS _inserted_timestamp) {% if not loop.last %}
api_name = 'snapshot') },{ 'query': 'query { spaces(orderBy: "created", orderDirection: desc, first: 1000, skip: ' || {{ item * 1000 }} || ') { id name about network symbol admins members categories domain private treasuries { address name network } verified } }' }) AS resp, SYSDATE() AS _inserted_timestamp) {% if not loop.last %}
UNION ALL
{% endif %}
{% endfor %}),

View File

@ -2,10 +2,9 @@
materialized = 'incremental',
incremental_strategy = 'delete+insert',
unique_key = 'address',
full_refresh = false,
tags = ['snapshot']
) }}
-- full_refresh = false,
-- backfill to complete in 1.5 weeks (estimate)
WITH initial_request AS ({% for item in range(6) %}
(

View File

@ -4,7 +4,6 @@
full_refresh = false,
tags = ['snapshot']
) }}
-- backfill from ethereum bronze_api__snapshot_votes
WITH initial_votes_request AS ({% for item in range(6) %}
(