mirror of
https://github.com/FlipsideCrypto/near-models.git
synced 2026-02-06 11:26:52 +00:00
CRs
This commit is contained in:
parent
3ed9b63c6a
commit
6b345d3ac1
4
macros/dbt/get_merge.sql
Normal file
4
macros/dbt/get_merge.sql
Normal file
@ -0,0 +1,4 @@
|
||||
{% macro get_merge_sql(target, source, unique_key, dest_columns, incremental_predicates) -%}
|
||||
{% set merge_sql = fsc_utils.get_merge_sql(target, source, unique_key, dest_columns, incremental_predicates) %}
|
||||
{{ return(merge_sql) }}
|
||||
{% endmacro %}
|
||||
@ -3,7 +3,7 @@
|
||||
{{ config (
|
||||
materialized = "incremental",
|
||||
incremental_strategy = 'merge',
|
||||
incremental_predicates = ["DBT_INTERNAL_DEST.block_timestamp::DATE >= (select min(block_timestamp::DATE) from " ~ generate_tmp_view_name(this) ~ ")"],
|
||||
incremental_predicates = ["dynamic_range_predicate","block_timestamp::date"],
|
||||
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) from " ~ generate_tmp_view_name(this) ~ ")"],
|
||||
incremental_predicates = ["dynamic_range_predicate","block_timestamp::date"],
|
||||
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) from " ~ generate_tmp_view_name(this) ~ ")"],
|
||||
incremental_predicates = ["dynamic_range_predicate","block_timestamp::date"],
|
||||
unique_key = "tx_hash",
|
||||
cluster_by = ['modified_timestamp::DATE','partition_key'],
|
||||
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION on equality(tx_hash)",
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
"external_table": "blocks_v2",
|
||||
"sql_limit": "10000",
|
||||
"producer_batch_size": "5000",
|
||||
"worker_batch_size": "3500",
|
||||
"worker_batch_size": "2500",
|
||||
"sql_source": "{{this.identifier}}",
|
||||
"order_by_column": "block_id DESC"
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user