mirror of
https://github.com/FlipsideCrypto/near-models.git
synced 2026-02-06 11:26:52 +00:00
rm unused udf, add quick note on lake
This commit is contained in:
parent
fa7c7738bf
commit
f1fa5240c6
@ -1,30 +0,0 @@
|
||||
-- todo, what if we receive a bad response?
|
||||
-- ask for backend deployment?
|
||||
{% macro create_UDF_GET_CHAINHEAD() %}
|
||||
{% set sql %}
|
||||
CREATE
|
||||
OR REPLACE FUNCTION {{ target.database }}.STREAMLINE.UDF_GET_CHAINHEAD(
|
||||
) returns INTEGER
|
||||
AS $$
|
||||
SELECT
|
||||
{{ target.database }}.live.udf_api(
|
||||
'POST',
|
||||
'{Service}',
|
||||
OBJECT_CONSTRUCT(
|
||||
'Content-Type', 'application/json'
|
||||
),
|
||||
OBJECT_CONSTRUCT(
|
||||
'jsonrpc', '2.0',
|
||||
'id', 'Flipside/getChainhead/0.1',
|
||||
'method', 'status',
|
||||
'params', OBJECT_CONSTRUCT(
|
||||
'finality', 'final'
|
||||
)
|
||||
),
|
||||
'Vault/prod/near/quicknode/mainnet'
|
||||
) :data :result :sync_info :latest_block_height :: INT AS block_id
|
||||
|
||||
$$
|
||||
{% endset %}
|
||||
{% do run_query(sql) %}
|
||||
{% endmacro %}
|
||||
7
models/silver/core/lake/README.md
Normal file
7
models/silver/core/lake/README.md
Normal file
@ -0,0 +1,7 @@
|
||||
# Near Lake Silver Models
|
||||
|
||||
The models in this directory were used to ingest and process the blocks and shards from the Near Lake Indexer.
|
||||
|
||||
They are being deprecated as of February 2025 in favor of Streamline 2.
|
||||
|
||||
Todo - around 30-60 days after the migration, these models will be deleted and the associated tables likely dropped from Snowflake.
|
||||
@ -3,7 +3,7 @@
|
||||
{{ config (
|
||||
materialized = "incremental",
|
||||
incremental_strategy = 'merge',
|
||||
incremental_predicates = ["DBT_INTERNAL_DEST.block_timestamp::DATE >= (select min(block_timestamp::DATE-7 ) from " ~ generate_tmp_view_name(this) ~ ")"],
|
||||
incremental_predicates = ["DBT_INTERNAL_DEST.block_timestamp::DATE >= (select min(block_timestamp::DATE) from " ~ generate_tmp_view_name(this) ~ ")"],
|
||||
unique_key = "block_hash",
|
||||
cluster_by = ['modified_timestamp::DATE','partition_key'],
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION on equality(block_hash)",
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
{{ config (
|
||||
materialized = "incremental",
|
||||
incremental_strategy = 'merge',
|
||||
incremental_predicates = ["DBT_INTERNAL_DEST.block_timestamp::DATE >= (select min(block_timestamp::DATE-7 ) from " ~ generate_tmp_view_name(this) ~ ")"],
|
||||
incremental_predicates = ["DBT_INTERNAL_DEST.block_timestamp::DATE >= (select min(block_timestamp::DATE) from " ~ generate_tmp_view_name(this) ~ ")"],
|
||||
unique_key = "chunk_hash",
|
||||
cluster_by = ['modified_timestamp::DATE','partition_key'],
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION on equality(chunk_hash)",
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
{{ config (
|
||||
materialized = "incremental",
|
||||
incremental_strategy = 'merge',
|
||||
incremental_predicates = ["DBT_INTERNAL_DEST.block_timestamp::DATE >= (select min(block_timestamp::DATE-7 ) from " ~ generate_tmp_view_name(this) ~ ")"],
|
||||
incremental_predicates = ["DBT_INTERNAL_DEST.block_timestamp::DATE >= (select min(block_timestamp::DATE) from " ~ generate_tmp_view_name(this) ~ ")"],
|
||||
unique_key = "tx_hash",
|
||||
cluster_by = ['modified_timestamp::DATE','partition_key'],
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION on equality(tx_hash)",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user