mirror of
https://github.com/FlipsideCrypto/optimism-models.git
synced 2026-02-06 13:26:44 +00:00
add (#267)
This commit is contained in:
parent
ded146796e
commit
d86fa16624
@ -37,6 +37,8 @@ SELECT
|
||||
total_fees_usd,
|
||||
platform_fee_usd,
|
||||
creator_fee_usd,
|
||||
tx_fee,
|
||||
tx_fee_usd,
|
||||
origin_from_address,
|
||||
origin_to_address,
|
||||
origin_function_signature,
|
||||
|
||||
@ -38,7 +38,7 @@ WITH nft_base_models AS (
|
||||
FROM
|
||||
{{ ref('silver__quix_sales') }}
|
||||
|
||||
{% if is_incremental() %}
|
||||
{% if is_incremental() and 'quix' not in var('HEAL_CURATED_MODEL') %}
|
||||
WHERE
|
||||
_inserted_timestamp >= (
|
||||
SELECT
|
||||
@ -80,7 +80,7 @@ SELECT
|
||||
FROM
|
||||
{{ ref('silver__quix_seaport_sales') }}
|
||||
|
||||
{% if is_incremental() %}
|
||||
{% if is_incremental() and 'quix_seaport' not in var('HEAL_CURATED_MODEL') %}
|
||||
WHERE
|
||||
_inserted_timestamp >= (
|
||||
SELECT
|
||||
@ -122,7 +122,7 @@ SELECT
|
||||
FROM
|
||||
{{ ref('silver__seaport_1_1_sales') }}
|
||||
|
||||
{% if is_incremental() %}
|
||||
{% if is_incremental() and 'seaport_1_1' not in var('HEAL_CURATED_MODEL') %}
|
||||
WHERE
|
||||
_inserted_timestamp >= (
|
||||
SELECT
|
||||
@ -164,7 +164,7 @@ SELECT
|
||||
FROM
|
||||
{{ ref('silver__seaport_1_4_sales') }}
|
||||
|
||||
{% if is_incremental() %}
|
||||
{% if is_incremental() and 'seaport_1_4' not in var('HEAL_CURATED_MODEL') %}
|
||||
WHERE
|
||||
_inserted_timestamp >= (
|
||||
SELECT
|
||||
@ -206,7 +206,49 @@ SELECT
|
||||
FROM
|
||||
{{ ref('silver__seaport_1_5_sales') }}
|
||||
|
||||
{% if is_incremental() %}
|
||||
{% if is_incremental() and 'seaport_1_5' not in var('HEAL_CURATED_MODEL') %}
|
||||
WHERE
|
||||
_inserted_timestamp >= (
|
||||
SELECT
|
||||
MAX(
|
||||
_inserted_timestamp
|
||||
) - INTERVAL '36 hours'
|
||||
FROM
|
||||
{{ this }}
|
||||
)
|
||||
{% endif %}
|
||||
UNION ALL
|
||||
SELECT
|
||||
block_number,
|
||||
block_timestamp,
|
||||
tx_hash,
|
||||
event_index,
|
||||
event_type,
|
||||
platform_address,
|
||||
platform_name,
|
||||
platform_exchange_version,
|
||||
seller_address,
|
||||
buyer_address,
|
||||
nft_address,
|
||||
erc1155_value :: STRING AS erc1155_value,
|
||||
tokenId,
|
||||
currency_address,
|
||||
total_price_raw,
|
||||
total_fees_raw,
|
||||
platform_fee_raw,
|
||||
creator_fee_raw,
|
||||
tx_fee,
|
||||
origin_from_address,
|
||||
origin_to_address,
|
||||
origin_function_signature,
|
||||
input_data,
|
||||
nft_log_id,
|
||||
_log_id,
|
||||
_inserted_timestamp
|
||||
FROM
|
||||
{{ ref('silver__seaport_1_6_sales') }}
|
||||
|
||||
{% if is_incremental() and 'seaport_1_6' not in var('HEAL_CURATED_MODEL') %}
|
||||
WHERE
|
||||
_inserted_timestamp >= (
|
||||
SELECT
|
||||
|
||||
@ -60,7 +60,7 @@ models:
|
||||
- name: CURRENCY_ADDRESS
|
||||
tests:
|
||||
- not_null:
|
||||
where: platform_exchange_version not in ('seaport_1_1', 'seaport_1_4', 'seaport_1_5')
|
||||
where: platform_exchange_version not in ('seaport_1_1', 'seaport_1_4', 'seaport_1_5', 'seaport_1_6')
|
||||
- name: PRICE
|
||||
tests:
|
||||
- not_null
|
||||
|
||||
@ -16,9 +16,6 @@ models:
|
||||
- name: 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_LTZ
|
||||
@ -101,9 +98,6 @@ models:
|
||||
- name: _INSERTED_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_LTZ
|
||||
|
||||
1984
models/silver/nft/sales/silver__seaport_1_6_sales.sql
Normal file
1984
models/silver/nft/sales/silver__seaport_1_6_sales.sql
Normal file
File diff suppressed because it is too large
Load Diff
133
models/silver/nft/sales/silver__seaport_1_6_sales.yml
Normal file
133
models/silver/nft/sales/silver__seaport_1_6_sales.yml
Normal file
@ -0,0 +1,133 @@
|
||||
version: 2
|
||||
models:
|
||||
- name: silver__seaport_1_6_sales
|
||||
tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- nft_log_id
|
||||
columns:
|
||||
- name: BLOCK_NUMBER
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_type_list:
|
||||
column_type_list:
|
||||
- NUMBER
|
||||
- FLOAT
|
||||
- name: 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_LTZ
|
||||
- TIMESTAMP_NTZ
|
||||
- name: TX_HASH
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
regex: 0[xX][0-9a-fA-F]+
|
||||
- name: PLATFORM_ADDRESS
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
regex: 0[xX][0-9a-fA-F]+
|
||||
- name: PLATFORM_NAME
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_set:
|
||||
value_set: ['opensea']
|
||||
- name: SELLER_ADDRESS
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
regex: 0[xX][0-9a-fA-F]+
|
||||
- name: BUYER_ADDRESS
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
regex: 0[xX][0-9a-fA-F]+
|
||||
- name: NFT_ADDRESS
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
regex: 0[xX][0-9a-fA-F]+
|
||||
- name: TOKENID
|
||||
tests:
|
||||
- not_null
|
||||
- name: CURRENCY_ADDRESS
|
||||
tests:
|
||||
- not_null:
|
||||
where: "total_price_raw > 0"
|
||||
- name: TOTAL_PRICE_RAW
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_type_list:
|
||||
column_type_list:
|
||||
- NUMBER
|
||||
- FLOAT
|
||||
- name: TOTAL_FEES_RAW
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_type_list:
|
||||
column_type_list:
|
||||
- NUMBER
|
||||
- FLOAT
|
||||
- name: PLATFORM_FEE_RAW
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_type_list:
|
||||
column_type_list:
|
||||
- NUMBER
|
||||
- FLOAT
|
||||
- name: CREATOR_FEE_RAW
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_type_list:
|
||||
column_type_list:
|
||||
- NUMBER
|
||||
- FLOAT
|
||||
- name: TX_FEE
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_type_list:
|
||||
column_type_list:
|
||||
- NUMBER
|
||||
- FLOAT
|
||||
- name: NFT_LOG_ID
|
||||
tests:
|
||||
- not_null
|
||||
- name: _INSERTED_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_LTZ
|
||||
- TIMESTAMP_NTZ
|
||||
- name: ORIGIN_FROM_ADDRESS
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
regex: 0[xX][0-9a-fA-F]+
|
||||
- name: ORIGIN_TO_ADDRESS
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
regex: 0[xX][0-9a-fA-F]+
|
||||
- name: ORIGIN_FUNCTION_SIGNATURE
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
regex: 0[xX][0-9a-fA-F]+
|
||||
- name: EVENT_TYPE
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_set:
|
||||
value_set: ['bid_won', 'sale']
|
||||
- name: INPUT_DATA
|
||||
tests:
|
||||
- not_null
|
||||
Loading…
Reference in New Issue
Block a user