remove hard coding; update cluster + so

This commit is contained in:
tarikceric 2025-09-05 13:58:14 -07:00
parent ea665dc63a
commit 5edee7d3e2
15 changed files with 20 additions and 20 deletions

View File

@ -5,7 +5,7 @@
incremental_predicates = ["dynamic_range_predicate", "block_timestamp::DATE"],
merge_exclude_columns = ["inserted_timestamp"],
cluster_by = ['block_timestamp::DATE'],
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_hash,platform,borrower,token_address);",
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_hash);",
tags = ['noncore']
) }}

View File

@ -5,7 +5,7 @@
incremental_predicates = ["dynamic_range_predicate", "block_timestamp::DATE"],
merge_exclude_columns = ["inserted_timestamp"],
cluster_by = ['block_timestamp::DATE'],
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_hash,platform,depositor,token_address);",
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_hash);",
tags = ['noncore']
) }}

View File

@ -5,7 +5,7 @@
incremental_predicates = ["dynamic_range_predicate", "block_timestamp::DATE"],
merge_exclude_columns = ["inserted_timestamp"],
cluster_by = ['block_timestamp::DATE'],
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_hash,platform,liquidator,borrower);",
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_hash);",
tags = ['noncore']
) }}

View File

@ -5,7 +5,7 @@
incremental_predicates = ["dynamic_range_predicate", "block_timestamp::DATE"],
merge_exclude_columns = ["inserted_timestamp"],
cluster_by = ['block_timestamp::DATE'],
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_hash,platform,payer,borrower);",
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_hash);",
tags = ['noncore']
) }}

View File

@ -5,7 +5,7 @@
incremental_predicates = ["dynamic_range_predicate", "block_timestamp::DATE"],
merge_exclude_columns = ["inserted_timestamp"],
cluster_by = ['block_timestamp::DATE'],
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_hash,platform,depositor,token_address);",
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(tx_hash);",
tags = ['noncore']
) }}

View File

@ -3,7 +3,7 @@
unique_key = "lending_echelon_borrows_id",
incremental_strategy = 'merge',
merge_exclude_columns = ["inserted_timestamp"],
cluster_by = ['block_timestamp::DATE', '_inserted_timestamp::DATE'],
cluster_by = ['modified_timestamp::DATE'],
tags = ['noncore']
) }}

View File

@ -3,7 +3,7 @@
unique_key = "lending_echelon_deposits_id",
incremental_strategy = 'merge',
merge_exclude_columns = ["inserted_timestamp"],
cluster_by = ['block_timestamp::DATE', '_inserted_timestamp::DATE'],
cluster_by = ['modified_timestamp::DATE'],
tags = ['noncore']
) }}

View File

@ -3,7 +3,7 @@
unique_key = "lending_echelon_liquidations_id",
incremental_strategy = 'merge',
merge_exclude_columns = ["inserted_timestamp"],
cluster_by = ['block_timestamp::DATE', '_inserted_timestamp::DATE'],
cluster_by = ['modified_timestamp::DATE'],
tags = ['noncore']
) }}

View File

@ -3,7 +3,7 @@
unique_key = "lending_echelon_repayments_id",
incremental_strategy = 'merge',
merge_exclude_columns = ["inserted_timestamp"],
cluster_by = ['block_timestamp::DATE', '_inserted_timestamp::DATE'],
cluster_by = ['modified_timestamp::DATE'],
tags = ['noncore']
) }}

View File

@ -3,7 +3,7 @@
unique_key = "lending_echelon_withdraws_id",
incremental_strategy = 'merge',
merge_exclude_columns = ["inserted_timestamp"],
cluster_by = ['block_timestamp::DATE', '_inserted_timestamp::DATE'],
cluster_by = ['modified_timestamp::DATE'],
tags = ['noncore']
) }}

View File

@ -3,7 +3,7 @@
unique_key = "lending_echo_borrows_id",
incremental_strategy = 'merge',
merge_exclude_columns = ["inserted_timestamp"],
cluster_by = ['block_timestamp::DATE', '_inserted_timestamp::DATE'],
cluster_by = ['modified_timestamp::DATE'],
tags = ['noncore']
) }}
@ -25,7 +25,7 @@ WITH events AS (
event_data:amount::number AS amount,
event_data:reserve::string AS lending_market, -- reserve is the market
_inserted_timestamp
FROM aptos.silver.events
FROM {{ ref('silver__events') }}
WHERE event_address = '0xeab7ea4d635b6b6add79d5045c4a45d8148d88287b1cfa1c3b6a4b56f46839ed'
AND event_module = 'borrow_logic'
AND event_resource = 'Borrow'

View File

@ -3,7 +3,7 @@
unique_key = "lending_echo_deposits_id",
incremental_strategy = 'merge',
merge_exclude_columns = ["inserted_timestamp"],
cluster_by = ['block_timestamp::DATE', '_inserted_timestamp::DATE'],
cluster_by = ['modified_timestamp::DATE'],
tags = ['noncore']
) }}
@ -25,7 +25,7 @@ WITH events AS (
event_data:amount::number AS amount,
event_data:reserve::string AS lending_market, -- reserve is the market
_inserted_timestamp
FROM aptos.silver.events
FROM {{ ref('silver__events') }}
WHERE event_address = '0xeab7ea4d635b6b6add79d5045c4a45d8148d88287b1cfa1c3b6a4b56f46839ed'
AND event_module = 'supply_logic'
AND event_resource = 'Supply'

View File

@ -3,7 +3,7 @@
unique_key = "lending_echo_liquidations_id",
incremental_strategy = 'merge',
merge_exclude_columns = ["inserted_timestamp"],
cluster_by = ['block_timestamp::DATE', '_inserted_timestamp::DATE'],
cluster_by = ['modified_timestamp::DATE'],
tags = ['noncore']
) }}
@ -27,7 +27,7 @@ WITH events AS (
event_data:collateral_asset::string AS collateral_token_market,
event_data:debt_asset::string AS debt_token_market,
_inserted_timestamp
FROM aptos.silver.events
FROM {{ ref('silver__events') }}
WHERE event_address = '0xeab7ea4d635b6b6add79d5045c4a45d8148d88287b1cfa1c3b6a4b56f46839ed'
AND event_module = 'liquidation_logic'
AND event_resource = 'LiquidationCall'

View File

@ -3,7 +3,7 @@
unique_key = "lending_echo_repayments_id",
incremental_strategy = 'merge',
merge_exclude_columns = ["inserted_timestamp"],
cluster_by = ['block_timestamp::DATE', '_inserted_timestamp::DATE'],
cluster_by = ['modified_timestamp::DATE'],
tags = ['noncore']
) }}
@ -26,7 +26,7 @@ WITH events AS (
event_data:amount::number AS amount,
event_data:reserve::string AS lending_market, -- reserve is the market
_inserted_timestamp
FROM aptos.silver.events
FROM {{ ref('silver__events') }}
WHERE event_address = '0xeab7ea4d635b6b6add79d5045c4a45d8148d88287b1cfa1c3b6a4b56f46839ed'
AND event_module = 'borrow_logic'
AND event_resource = 'Repay'

View File

@ -3,7 +3,7 @@
unique_key = "lending_echo_withdraws_id",
incremental_strategy = 'merge',
merge_exclude_columns = ["inserted_timestamp"],
cluster_by = ['block_timestamp::DATE', '_inserted_timestamp::DATE'],
cluster_by = ['modified_timestamp::DATE'],
tags = ['noncore']
) }}
@ -25,7 +25,7 @@ WITH events AS (
event_data:amount::number AS amount,
event_data:reserve::string AS lending_market, -- reserve is the market
_inserted_timestamp
FROM aptos.silver.events
FROM {{ ref('silver__events') }}
WHERE event_address = '0xeab7ea4d635b6b6add79d5045c4a45d8148d88287b1cfa1c3b6a4b56f46839ed'
AND event_module = 'supply_logic'
AND event_resource = 'Withdraw'