From 285be4b1c28c998c3da3495198bc314d7ff292a9 Mon Sep 17 00:00:00 2001 From: tarikceric <46071768+tarikceric@users.noreply.github.com> Date: Wed, 16 Jul 2025 11:44:33 -0700 Subject: [PATCH] update unique test, removed col from events_inner (#62) --- models/gold/core/core__fact_blocks.yml | 2 +- models/gold/core/core__fact_events.yml | 2 +- models/gold/core/core__fact_events_inner.sql | 1 - models/gold/core/core__fact_events_inner.yml | 7 +------ models/gold/core/core__fact_transactions.yml | 2 +- models/gold/core/core__fact_transfers.yml | 3 +-- models/gold/defi/defi__fact_token_burn_actions.yml | 3 +-- models/gold/defi/defi__fact_token_mint_actions.sql.yml | 2 +- 8 files changed, 7 insertions(+), 15 deletions(-) diff --git a/models/gold/core/core__fact_blocks.yml b/models/gold/core/core__fact_blocks.yml index 60fc395..181a53b 100644 --- a/models/gold/core/core__fact_blocks.yml +++ b/models/gold/core/core__fact_blocks.yml @@ -13,7 +13,7 @@ models: data_tests: - dbt_expectations.expect_column_to_exist - not_null: *recent_date_filter - - unique + - unique: *recent_date_filter - name: BLOCK_TIMESTAMP description: "{{ doc('block_timestamp') }}" data_tests: diff --git a/models/gold/core/core__fact_events.yml b/models/gold/core/core__fact_events.yml index c20ed3e..dd1f616 100644 --- a/models/gold/core/core__fact_events.yml +++ b/models/gold/core/core__fact_events.yml @@ -10,7 +10,7 @@ models: combination_of_columns: - TX_ID - INDEX - where: block_timestamp::date > current_date - 30 + where: block_timestamp::date > current_date - 7 columns: - name: BLOCK_TIMESTAMP description: "{{ doc('block_timestamp') }}" diff --git a/models/gold/core/core__fact_events_inner.sql b/models/gold/core/core__fact_events_inner.sql index 2a3fe08..d70bb41 100644 --- a/models/gold/core/core__fact_events_inner.sql +++ b/models/gold/core/core__fact_events_inner.sql @@ -32,7 +32,6 @@ SELECT program_id, event_type, instruction, - _inserted_timestamp, events_inner_id AS fact_events_inner_id, sysdate() AS inserted_timestamp, sysdate() AS modified_timestamp diff --git a/models/gold/core/core__fact_events_inner.yml b/models/gold/core/core__fact_events_inner.yml index f2ce77e..67f62f0 100644 --- a/models/gold/core/core__fact_events_inner.yml +++ b/models/gold/core/core__fact_events_inner.yml @@ -11,7 +11,7 @@ models: - TX_ID - INSTRUCTION_INDEX - INNER_INDEX - where: block_timestamp::date > current_date - 30 + where: block_timestamp::date > current_date - 7 columns: - name: BLOCK_TIMESTAMP description: "{{ doc('block_timestamp') }}" @@ -67,11 +67,6 @@ models: data_tests: - dbt_expectations.expect_column_to_exist - not_null: *recent_date_filter - - name: _INSERTED_TIMESTAMP - description: "{{ doc('_inserted_timestamp') }}" - data_tests: - - dbt_expectations.expect_column_to_exist - - not_null - name: FACT_EVENTS_INNER_ID description: '{{ doc("pk") }}' data_tests: diff --git a/models/gold/core/core__fact_transactions.yml b/models/gold/core/core__fact_transactions.yml index 47d529f..2954319 100644 --- a/models/gold/core/core__fact_transactions.yml +++ b/models/gold/core/core__fact_transactions.yml @@ -29,7 +29,7 @@ models: data_tests: - dbt_expectations.expect_column_to_exist - not_null: *recent_date_filter - - unique + - unique: *recent_date_filter - name: INDEX description: "{{ doc('tx_index') }}" data_tests: diff --git a/models/gold/core/core__fact_transfers.yml b/models/gold/core/core__fact_transfers.yml index 9d7f92e..fe9fd8b 100644 --- a/models/gold/core/core__fact_transfers.yml +++ b/models/gold/core/core__fact_transfers.yml @@ -11,7 +11,7 @@ models: - TX_ID - INDEX - INNER_INDEX - where: block_timestamp::date > current_date - 30 + where: block_timestamp::date > current_date - 7 columns: - name: BLOCK_TIMESTAMP description: "{{ doc('block_timestamp') }}" @@ -83,7 +83,6 @@ models: description: '{{ doc("pk") }}' data_tests: - not_null: *recent_date_filter - - unique - name: INSERTED_TIMESTAMP description: '{{ doc("inserted_timestamp") }}' data_tests: diff --git a/models/gold/defi/defi__fact_token_burn_actions.yml b/models/gold/defi/defi__fact_token_burn_actions.yml index 8bcce28..53bffb5 100644 --- a/models/gold/defi/defi__fact_token_burn_actions.yml +++ b/models/gold/defi/defi__fact_token_burn_actions.yml @@ -12,7 +12,7 @@ models: - INDEX - INNER_INDEX - MINT - where: block_timestamp::date > current_date - 30 + where: block_timestamp::date > current_date - 7 columns: - name: BLOCK_TIMESTAMP description: "{{ doc('block_timestamp') }}" @@ -86,7 +86,6 @@ models: description: '{{ doc("pk") }}' data_tests: - not_null: *recent_date_filter - - unique - name: INSERTED_TIMESTAMP description: '{{ doc("inserted_timestamp") }}' data_tests: diff --git a/models/gold/defi/defi__fact_token_mint_actions.sql.yml b/models/gold/defi/defi__fact_token_mint_actions.sql.yml index b1ea687..5644dfd 100644 --- a/models/gold/defi/defi__fact_token_mint_actions.sql.yml +++ b/models/gold/defi/defi__fact_token_mint_actions.sql.yml @@ -12,7 +12,7 @@ models: - MINT - INDEX - INNER_INDEX - where: block_timestamp::date > current_date - 30 + where: block_timestamp::date > current_date - 7 columns: - name: BLOCK_TIMESTAMP description: "{{ doc('block_timestamp') }}"