Skip to content

Commit

Permalink
upd gold
Browse files Browse the repository at this point in the history
  • Loading branch information
forgxyz committed Dec 10, 2024
1 parent b105b1c commit 68d5aee
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion models/descriptions/receipt_object_id.md
Original file line number Diff line number Diff line change
@@ -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 %}

10 changes: 5 additions & 5 deletions models/gold/core/core__fact_logs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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')}}"
Expand Down
4 changes: 2 additions & 2 deletions models/gold/core/core__fact_receipts.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions models/gold/core/core__fact_receipts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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')}}"
Expand All @@ -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')}}"
Expand Down Expand Up @@ -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')}}"
Expand Down
14 changes: 7 additions & 7 deletions models/gold/core/core__fact_transactions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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')}}"
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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')}}"
Expand Down

0 comments on commit 68d5aee

Please sign in to comment.