mirror of
https://github.com/FlipsideCrypto/flow-models.git
synced 2026-02-06 13:26:44 +00:00
Adj Test on Beta and Upd Staking Actions (#206)
This commit is contained in:
parent
75901993ad
commit
ea46f3ee02
@ -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
|
||||
|
||||
|
||||
@ -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 %}
|
||||
),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user