add predecessor id to staking models

This commit is contained in:
Jack Forgash 2024-10-01 15:15:19 -06:00
parent ad76bd7b8c
commit 9e64a2d646
7 changed files with 30 additions and 1 deletions

View File

@ -13,6 +13,7 @@ WITH staking_actions AS (
block_timestamp,
receipt_object_id,
receiver_id AS address,
predecessor_id,
signer_id,
action,
amount_adj AS amount,

View File

@ -40,6 +40,11 @@ models:
tests:
- not_null
- name: PREDECESSOR_ID
description: "{{ doc('predecessor_id') }}"
tests:
- not_null
- name: SIGNER_ID
description: "{{ doc('signer_id') }}"
tests:

View File

@ -27,6 +27,7 @@ FINAL AS (
receipt_object_id,
receiver_id,
signer_id,
predecessor_id,
LOG,
TO_NUMBER(
REGEXP_SUBSTR(

View File

@ -8,7 +8,17 @@
WITH receipts AS (
SELECT
*
tx_hash,
block_id,
block_timestamp,
receipt_object_id,
receiver_id,
signer_id,
receipt_actions :predecessor_id :: STRING AS predecessor_id,
status_value,
logs,
_inserted_timestamp,
_partition_by_block_number
FROM
{{ ref('silver__streamline_receipts_final') }}
WHERE
@ -27,6 +37,7 @@ FINAL AS (
receipt_object_id,
receiver_id,
signer_id,
predecessor_id,
status_value,
logs,
VALUE AS LOG,

View File

@ -43,6 +43,11 @@ models:
tests:
- not_null
- name: predecessor_id
description: "{{ doc('predecessor_id') }}"
tests:
- not_null
- name: status_value
description: "{{ doc('status_value') }}"
tests:

View File

@ -17,6 +17,7 @@ WITH pool_events AS (
receipt_object_id,
receiver_id,
signer_id,
predecessor_id,
status_value,
logs,
LOG,
@ -44,6 +45,7 @@ staking_actions AS (
receipt_object_id,
receiver_id,
signer_id,
predecessor_id,
status_value,
logs,
LOG,
@ -86,6 +88,7 @@ FINAL AS (
receipt_object_id,
receiver_id,
signer_id,
predecessor_id,
status_value,
logs,
LOG,

View File

@ -25,6 +25,9 @@ models:
- name: signer_id
description: "{{ doc('signer_id') }}"
- name: predecessor_id
description: "{{ doc('predecessor_id') }}"
- name: status_value
description: "{{ doc('status_value') }}"