mirror of
https://github.com/FlipsideCrypto/external-models.git
synced 2026-02-06 15:36:45 +00:00
update/snapshot-cmt (#37)
This commit is contained in:
parent
502010285c
commit
1c43dba0ce
@ -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) %}
|
||||
(
|
||||
|
||||
@ -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 %}),
|
||||
|
||||
@ -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) %}
|
||||
(
|
||||
|
||||
@ -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) %}
|
||||
(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user