Adj Test on Beta and Upd Staking Actions (#206)

This commit is contained in:
Jack Forgash 2023-10-16 18:17:45 -06:00 committed by GitHub
parent 75901993ad
commit ea46f3ee02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 63 deletions

View File

@ -3,84 +3,29 @@ version: 2
models:
- name: beta__ez_nft_topshot_packs
description: |-
This ez_ view contains the NBA TopShot nfts transfers related to rips. These are assumed to be packs that were purchased and opened. This is an alpha version and does not have sale price or pack name at this time.
Deprecating soon. This model was a beta table and will no longer be supported. This ez_ view contains the NBA TopShot nfts transfers related to rips. These are assumed to be packs that were purchased and opened. This is an alpha version and does not have sale price or pack name at this time.
tests:
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- tx_id
- buyer
- nft_id
columns:
- name: TX_ID
description: "{{ doc('tx_id') }}"
tests:
- not_null
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- STRING
- VARCHAR
- name: BLOCK_HEIGHT
description: "{{ doc('block_height') }}"
tests:
- not_null
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- NUMBER
- FLOAT
- name: BLOCK_TIMESTAMP
description: "{{ doc('block_timestamp') }}"
tests:
- not_null
- dbt_expectations.expect_row_values_to_have_recent_data:
datepart: day
interval: 1
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- TIMESTAMP_NTZ
- name: MARKETPLACE
description: "{{ doc('marketplace') }}"
tests:
- not_null
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- STRING
- VARCHAR
- name: NFT_ID
description: "{{ doc('nft_id') }}"
tests:
- not_null
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- STRING
- VARCHAR
- NUMBER
- name: BUYER
description: "{{ doc('buyer') }}"
tests:
- not_null
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- STRING
- VARCHAR
- name: SELLER
description: "{{ doc('seller') }}"
- name: TX_SUCCEEDED
description: "{{ doc('tx_succeeded') }}"
tests:
- not_null
- dbt_expectations.expect_column_values_to_be_in_type_list:
column_type_list:
- BOOLEAN

View File

@ -12,8 +12,6 @@ WITH silver_events AS (
*
FROM
{{ ref('silver__streamline_events') }}
-- WHERE
-- event_data :: STRING != '{}'
{% if is_incremental() %}
WHERE
@ -23,6 +21,15 @@ WHERE
FROM
{{ this }}
)
OR tx_id IN (
SELECT
tx_id
FROM
{{ this }}
WHERE
_inserted_timestamp >= SYSDATE() - INTERVAL '14 days'
AND delegator IS NULL
)
{% endif %}
),
flow_staking AS (
@ -69,11 +76,22 @@ add_auth AS (
)
{% if is_incremental() %}
AND _inserted_timestamp >= (
SELECT
MAX(_inserted_timestamp)
FROM
{{ this }}
AND (
_inserted_timestamp >= (
SELECT
MAX(_inserted_timestamp)
FROM
{{ this }}
)
OR tx_id IN (
SELECT
tx_id
FROM
{{ this }}
WHERE
_inserted_timestamp >= SYSDATE() - INTERVAL '14 days'
AND delegator IS NULL
)
)
{% endif %}
),