From 68d5aee83b4fbd52c9811973ced15b7c25ef22d7 Mon Sep 17 00:00:00 2001 From: Jack Forgash <58153492+forgxyz@users.noreply.github.com> Date: Tue, 10 Dec 2024 13:47:49 -0700 Subject: [PATCH] upd gold --- models/descriptions/receipt_object_id.md | 2 +- models/gold/core/core__fact_logs.yml | 10 +++++----- models/gold/core/core__fact_receipts.sql | 4 ++-- models/gold/core/core__fact_receipts.yml | 8 ++++---- models/gold/core/core__fact_transactions.yml | 14 +++++++------- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/models/descriptions/receipt_object_id.md b/models/descriptions/receipt_object_id.md index 3afc4d8f..cccecdfa 100644 --- a/models/descriptions/receipt_object_id.md +++ b/models/descriptions/receipt_object_id.md @@ -1,6 +1,6 @@ {% docs receipt_object_id %} -Unique identifier of the receipt object for this transaction. +Please note this column is being deprecated in favor of simply "receipt_id". {% enddocs %} diff --git a/models/gold/core/core__fact_logs.yml b/models/gold/core/core__fact_logs.yml index c0622043..fac106be 100644 --- a/models/gold/core/core__fact_logs.yml +++ b/models/gold/core/core__fact_logs.yml @@ -24,19 +24,19 @@ models: description: "{{ doc('block_timestamp')}}" tests: - not_null: - where: inserted_timestamp BETWEEN SYSDATE() - INTERVAL '7 days' AND SYSDATE() - INTERVAL '2 hours' + where: inserted_timestamp >= SYSDATE() - INTERVAL '7 days' - name: TX_HASH description: "{{ doc('tx_hash')}}" tests: - not_null: - where: inserted_timestamp BETWEEN SYSDATE() - INTERVAL '7 days' AND SYSDATE() - INTERVAL '2 hours' + where: inserted_timestamp >= SYSDATE() - INTERVAL '7 days' - name: RECEIPT_ID description: "{{ doc('receipt_id')}}" tests: - not_null: - where: inserted_timestamp BETWEEN SYSDATE() - INTERVAL '7 days' AND SYSDATE() - INTERVAL '2 hours' + where: inserted_timestamp >= SYSDATE() - INTERVAL '7 days' - dbt_expectations.expect_column_values_to_be_in_type_list: column_type_list: - STRING @@ -111,9 +111,9 @@ models: description: "{{doc('id')}}" tests: - unique: - where: inserted_timestamp BETWEEN SYSDATE() - INTERVAL '7 days' AND SYSDATE() - INTERVAL '2 hours' + where: inserted_timestamp >= SYSDATE() - INTERVAL '7 days' - not_null: - where: inserted_timestamp BETWEEN SYSDATE() - INTERVAL '7 days' AND SYSDATE() - INTERVAL '2 hours' + where: inserted_timestamp >= SYSDATE() - INTERVAL '7 days' - name: INSERTED_TIMESTAMP description: "{{doc('inserted_timestamp')}}" diff --git a/models/gold/core/core__fact_receipts.sql b/models/gold/core/core__fact_receipts.sql index 698675a1..b403770b 100644 --- a/models/gold/core/core__fact_receipts.sql +++ b/models/gold/core/core__fact_receipts.sql @@ -18,7 +18,7 @@ SELECT receipt_object_id AS receipt_id, receipt_outcome_id, receiver_id, - actions :predecessor_id :: STRING AS predecessor_id, + receipt_actions :predecessor_id :: STRING AS predecessor_id, receipt_actions AS actions, execution_outcome AS outcome, gas_burnt, @@ -33,7 +33,7 @@ SELECT ['receipt_object_id'] ) }} ) AS fact_receipts_id, - receipt_object_id, + receipt_object_id, -- to be deprecated COALESCE(inserted_timestamp, _inserted_timestamp, '2000-01-01' :: TIMESTAMP_NTZ) AS inserted_timestamp, COALESCE(modified_timestamp, _inserted_timestamp, '2000-01-01' :: TIMESTAMP_NTZ) AS modified_timestamp FROM diff --git a/models/gold/core/core__fact_receipts.yml b/models/gold/core/core__fact_receipts.yml index 67613613..2f96f983 100644 --- a/models/gold/core/core__fact_receipts.yml +++ b/models/gold/core/core__fact_receipts.yml @@ -17,7 +17,7 @@ models: column_type_list: - TIMESTAMP_NTZ - not_null: - where: inserted_timestamp BETWEEN SYSDATE() - INTERVAL '7 days' AND SYSDATE() - INTERVAL '2 hours' + where: inserted_timestamp >= SYSDATE() - INTERVAL '7 days' - name: BLOCK_ID description: "{{ doc('block_id')}}" @@ -35,7 +35,7 @@ models: - STRING - VARCHAR - not_null: - where: inserted_timestamp BETWEEN SYSDATE() - INTERVAL '7 days' AND SYSDATE() - INTERVAL '2 hours' + where: inserted_timestamp >= SYSDATE() - INTERVAL '7 days' - name: RECEIPT_ID description: "{{ doc('receipt_id')}}" @@ -135,9 +135,9 @@ models: description: "{{doc('id')}}" tests: - unique: - where: inserted_timestamp BETWEEN SYSDATE() - INTERVAL '7 days' AND SYSDATE() - INTERVAL '2 hours' + where: inserted_timestamp >= SYSDATE() - INTERVAL '7 days' - not_null: - where: inserted_timestamp BETWEEN SYSDATE() - INTERVAL '7 days' AND SYSDATE() - INTERVAL '2 hours' + where: inserted_timestamp >= SYSDATE() - INTERVAL '7 days' - name: INSERTED_TIMESTAMP description: "{{doc('inserted_timestamp')}}" diff --git a/models/gold/core/core__fact_transactions.yml b/models/gold/core/core__fact_transactions.yml index 7426f3b1..bb5d120b 100644 --- a/models/gold/core/core__fact_transactions.yml +++ b/models/gold/core/core__fact_transactions.yml @@ -44,7 +44,7 @@ models: column_type_list: - TIMESTAMP_NTZ - not_null: - where: inserted_timestamp BETWEEN SYSDATE() - INTERVAL '7 days' AND SYSDATE() - INTERVAL '2 hours' + where: inserted_timestamp >= SYSDATE() - INTERVAL '7 days' - name: NONCE description: "{{ doc('nonce')}}" @@ -93,7 +93,7 @@ models: description: "{{ doc('gas_used')}}" tests: - not_null: - where: inserted_timestamp BETWEEN SYSDATE() - INTERVAL '7 days' AND SYSDATE() - INTERVAL '2 hours' + where: inserted_timestamp >= SYSDATE() - INTERVAL '7 days' - dbt_expectations.expect_column_values_to_be_in_type_list: column_type_list: - NUMBER @@ -103,7 +103,7 @@ models: description: "{{ doc('attached_gas')}}" tests: - not_null: - where: inserted_timestamp BETWEEN SYSDATE() - INTERVAL '7 days' AND SYSDATE() - INTERVAL '2 hours' + where: inserted_timestamp >= SYSDATE() - INTERVAL '7 days' - dbt_expectations.expect_column_values_to_be_in_type_list: column_type_list: - NUMBER @@ -113,7 +113,7 @@ models: description: "{{ doc('transaction_fee')}}" tests: - not_null: - where: inserted_timestamp BETWEEN SYSDATE() - INTERVAL '7 days' AND SYSDATE() - INTERVAL '2 hours' + where: inserted_timestamp >= SYSDATE() - INTERVAL '7 days' - dbt_expectations.expect_column_values_to_be_in_type_list: column_type_list: - NUMBER @@ -123,7 +123,7 @@ models: description: "{{ doc('tx_succeeded')}}" tests: - not_null: - where: inserted_timestamp BETWEEN SYSDATE() - INTERVAL '7 days' AND SYSDATE() - INTERVAL '2 hours' + where: inserted_timestamp >= SYSDATE() - INTERVAL '7 days' - dbt_expectations.expect_column_values_to_be_in_type_list: column_type_list: - BOOLEAN @@ -132,9 +132,9 @@ models: description: "{{doc('id')}}" tests: - unique: - where: inserted_timestamp BETWEEN SYSDATE() - INTERVAL '7 days' AND SYSDATE() - INTERVAL '2 hours' + where: inserted_timestamp >= SYSDATE() - INTERVAL '7 days' - not_null: - where: inserted_timestamp BETWEEN SYSDATE() - INTERVAL '7 days' AND SYSDATE() - INTERVAL '2 hours' + where: inserted_timestamp >= SYSDATE() - INTERVAL '7 days' - name: INSERTED_TIMESTAMP description: "{{doc('inserted_timestamp')}}"