added sender to events and changes, moved clustering from changes to transactions

This commit is contained in:
Mike Stepanovic 2025-03-07 14:27:05 -07:00
parent cede6d6f4c
commit 4774616008
3 changed files with 4 additions and 2 deletions

View File

@ -4,7 +4,7 @@
incremental_strategy = 'merge',
incremental_predicates = ["dynamic_range_predicate","block_timestamp::DATE"],
merge_exclude_columns = ["inserted_timestamp"],
cluster_by = ['block_timestamp::DATE','modified_timestamp::DATE'],
cluster_by = ['block_timestamp::DATE'],
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(version,tx_hash,change_type,inner_change_type,change_address,change_module,change_resource,payload_function);",
tags = ['core']
) }}
@ -16,6 +16,7 @@ SELECT
version,
success,
A.tx_type,
A.sender,
A.payload_function,
b.index AS change_index,
b.value :data :data AS change_data,

View File

@ -16,6 +16,7 @@ SELECT
version,
success,
A.tx_type,
A.sender,
A.payload_function,
b.index AS event_index,
b.value :type :: STRING AS event_type,

View File

@ -4,7 +4,7 @@
incremental_strategy = 'merge',
incremental_predicates = ["dynamic_range_predicate", "block_timestamp::DATE"],
merge_exclude_columns = ["inserted_timestamp"],
cluster_by = ['block_timestamp::DATE'],
cluster_by = ['block_timestamp::DATE','modified_timestamp::DATE'],
post_hook = "ALTER TABLE {{ this }} ADD SEARCH OPTIMIZATION ON EQUALITY(version,tx_hash,payload_function,sender);",
tags = ['core']
) }}