mirror of
https://github.com/FlipsideCrypto/flow-models.git
synced 2026-02-06 13:26:44 +00:00
deprecation (#222)
* deprecation * del old udf creation --------- Co-authored-by: forgash_ <jmfxyz@pm.me>
This commit is contained in:
parent
366f25b1d3
commit
d17d5f06d7
File diff suppressed because it is too large
Load Diff
@ -2,9 +2,6 @@
|
||||
{% if var("UPDATE_UDFS_AND_SPS") %}
|
||||
{% if target.database != "FLOW_COMMUNITY_DEV" %}
|
||||
{% set sql %}
|
||||
|
||||
{{ udf_bulk_get_topshot_moments_minted_metadata() }};
|
||||
{{ udf_bulk_get_nfl_allday_moments_metadata() }};
|
||||
|
||||
{{ create_udtf_get_base_table(
|
||||
schema = "streamline"
|
||||
|
||||
@ -1,28 +0,0 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
tags = ['nft', 'ez']
|
||||
) }}
|
||||
|
||||
WITH silver_nfts AS (
|
||||
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
{{ ref('silver__nft_topshot_pack_sales') }}
|
||||
),
|
||||
gold_nfts AS (
|
||||
SELECT
|
||||
tx_id,
|
||||
block_height,
|
||||
block_timestamp,
|
||||
marketplace,
|
||||
nft_id,
|
||||
buyer,
|
||||
tx_succeeded
|
||||
FROM
|
||||
silver_nfts
|
||||
)
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
gold_nfts
|
||||
@ -1,31 +0,0 @@
|
||||
version: 2
|
||||
|
||||
models:
|
||||
- name: beta__ez_nft_topshot_packs
|
||||
description: |-
|
||||
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.
|
||||
|
||||
columns:
|
||||
- name: TX_ID
|
||||
description: "{{ doc('tx_id') }}"
|
||||
|
||||
- name: BLOCK_HEIGHT
|
||||
description: "{{ doc('block_height') }}"
|
||||
|
||||
- name: BLOCK_TIMESTAMP
|
||||
description: "{{ doc('block_timestamp') }}"
|
||||
|
||||
- name: MARKETPLACE
|
||||
description: "{{ doc('marketplace') }}"
|
||||
|
||||
- name: NFT_ID
|
||||
description: "{{ doc('nft_id') }}"
|
||||
|
||||
- name: BUYER
|
||||
description: "{{ doc('buyer') }}"
|
||||
|
||||
- name: SELLER
|
||||
description: "{{ doc('seller') }}"
|
||||
|
||||
- name: TX_SUCCEEDED
|
||||
description: "{{ doc('tx_succeeded') }}"
|
||||
@ -1,43 +0,0 @@
|
||||
{{ config (
|
||||
materialized = 'view',
|
||||
tags = ['scheduled']
|
||||
) }}
|
||||
|
||||
WITH pairs AS (
|
||||
|
||||
SELECT
|
||||
swap_contract,
|
||||
deployment_timestamp,
|
||||
token0_contract,
|
||||
token1_contract,
|
||||
pool_id,
|
||||
vault_address
|
||||
FROM
|
||||
{{ ref('silver__labels_pools') }}
|
||||
),
|
||||
metapier AS (
|
||||
SELECT
|
||||
swap_contract,
|
||||
deployment_timestamp,
|
||||
token0_contract,
|
||||
token1_contract,
|
||||
pool_id,
|
||||
vault_address
|
||||
FROM
|
||||
{{ ref('silver__labels_pools_metapier') }}
|
||||
),
|
||||
FINAL AS (
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
pairs
|
||||
UNION
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
metapier
|
||||
)
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
FINAL
|
||||
@ -1,28 +0,0 @@
|
||||
version: 2
|
||||
|
||||
models:
|
||||
- name: core__dim_swap_pool_labels
|
||||
description: |-
|
||||
Deprecating soon: This is a notice that we're replacing this table with **FLOW.DEFI.DIM_SWAP_POOL_LABELS**. Please migrate queries to the new table by **9/14/23**. There will be no column changes or any other changes of any kind.
|
||||
|
||||
columns:
|
||||
- name: tx_id
|
||||
description: "{{ doc('tx_id') }}"
|
||||
|
||||
- name: deployment_timestamp
|
||||
description: "{{ doc('deployment_timestamp') }}"
|
||||
|
||||
- name: token0_contract
|
||||
description: "{{ doc('token0_contract') }}"
|
||||
|
||||
- name: token1_contract
|
||||
description: "{{ doc('token1_contract') }}"
|
||||
|
||||
- name: pool_id
|
||||
description: "{{ doc('pool_id') }}"
|
||||
|
||||
- name: vault_address
|
||||
description: "{{ doc('vault_address') }}"
|
||||
|
||||
- name: swap_contract
|
||||
description: "{{ doc('swap_contract') }}"
|
||||
@ -1,58 +0,0 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
tags = ['ez', 'bridge', 'scheduled'],
|
||||
meta={
|
||||
'database_tags':{
|
||||
'table': {
|
||||
'PURPOSE': 'BRIDGE'
|
||||
}
|
||||
}
|
||||
}
|
||||
) }}
|
||||
|
||||
WITH blocto AS (
|
||||
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
{{ ref('silver__bridge_blocto') }}
|
||||
),
|
||||
celer AS (
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
{{ ref('silver__bridge_celer') }}
|
||||
),
|
||||
combo AS (
|
||||
SELECT
|
||||
tx_id,
|
||||
block_timestamp,
|
||||
block_height,
|
||||
teleport_contract AS bridge_contract,
|
||||
token_contract,
|
||||
gross_amount AS amount,
|
||||
flow_wallet_address,
|
||||
blockchain,
|
||||
teleport_direction AS direction,
|
||||
bridge
|
||||
FROM
|
||||
blocto
|
||||
UNION
|
||||
SELECT
|
||||
tx_id,
|
||||
block_timestamp,
|
||||
block_height,
|
||||
bridge_contract,
|
||||
token_contract,
|
||||
amount,
|
||||
flow_wallet_address,
|
||||
blockchain,
|
||||
direction,
|
||||
bridge
|
||||
FROM
|
||||
celer
|
||||
)
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
combo
|
||||
@ -1,37 +0,0 @@
|
||||
version: 2
|
||||
|
||||
models:
|
||||
- name: core__ez_bridge_transactions
|
||||
description: |-
|
||||
Deprecating soon: This is a notice that we're replacing this table with **FLOW.DEFI.EZ_BRIDGE_TRANSACTIONS**. Please migrate queries to the new table by **9/14/23**. There will be no column changes or any other changes of any kind.
|
||||
|
||||
columns:
|
||||
- name: TX_ID
|
||||
description: "{{ doc('tx_id') }}"
|
||||
|
||||
- name: BLOCK_TIMESTAMP
|
||||
description: "{{ doc('block_timestamp') }}"
|
||||
|
||||
- name: BLOCK_HEIGHT
|
||||
description: "{{ doc('block_height') }}"
|
||||
|
||||
- name: BRIDGE_CONTRACT
|
||||
description: "{{ doc('bridge_contract') }}"
|
||||
|
||||
- name: TOKEN_CONTRACT
|
||||
description: "{{ doc('token_contract') }}"
|
||||
|
||||
- name: AMOUNT
|
||||
description: "{{ doc('amount') }}"
|
||||
|
||||
- name: FLOW_WALLET_ADDRESS
|
||||
description: "{{ doc('flow_wallet_address') }}"
|
||||
|
||||
- name: BLOCKCHAIN
|
||||
description: "{{ doc('blockchain') }}"
|
||||
|
||||
- name: DIRECTION
|
||||
description: "{{ doc('direction') }}"
|
||||
|
||||
- name: BRIDGE
|
||||
description: "{{ doc('bridge') }}"
|
||||
@ -1,27 +0,0 @@
|
||||
{{ config (
|
||||
materialized = 'view',
|
||||
tags = ['ez', 'scheduled'],
|
||||
meta={
|
||||
'database_tags':{
|
||||
'table': {
|
||||
'PURPOSE': 'SWAPS'
|
||||
}
|
||||
}
|
||||
}
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
tx_id,
|
||||
block_timestamp,
|
||||
block_height,
|
||||
swap_contract,
|
||||
swap_index,
|
||||
trader,
|
||||
token_out_source,
|
||||
token_out_contract,
|
||||
token_out_amount,
|
||||
token_in_destination,
|
||||
token_in_contract,
|
||||
token_in_amount
|
||||
FROM
|
||||
{{ ref('silver__swaps') }}
|
||||
@ -1,44 +0,0 @@
|
||||
version: 2
|
||||
|
||||
models:
|
||||
- name: core__ez_swaps
|
||||
description: |-
|
||||
Deprecating soon: This is a notice that we're replacing this table with **FLOW.DEFI.EZ_SWAPS**. Please migrate queries to the new table by **9/14/23**. There will be no column changes or any other changes of any kind.
|
||||
|
||||
columns:
|
||||
- name: tx_id
|
||||
description: "{{ doc('tx_id') }}"
|
||||
|
||||
- name: block_timestamp
|
||||
description: "{{ doc('block_timestamp') }}"
|
||||
|
||||
- name: block_height
|
||||
description: "{{ doc('block_height') }}"
|
||||
|
||||
- name: swap_contract
|
||||
description: "{{ doc('swap_contract') }}"
|
||||
|
||||
- name: swap_index
|
||||
description: "{{ doc('swap_index') }}"
|
||||
|
||||
- name: trader
|
||||
description: "{{ doc('trader') }}"
|
||||
|
||||
- name: token_out_source
|
||||
description: "{{ doc('token_out_source') }}"
|
||||
|
||||
- name: token_out_amount
|
||||
description: "{{ doc('token_out_amount') }}"
|
||||
|
||||
- name: token_out_contract
|
||||
description: "{{ doc('token_out_contract') }}"
|
||||
|
||||
- name: token_in_destination
|
||||
description: "{{ doc('token_in_destination') }}"
|
||||
|
||||
- name: token_in_amount
|
||||
description: "{{ doc('token_in_amount') }}"
|
||||
|
||||
- name: token_in_contract
|
||||
description: "{{ doc('token_in_contract') }}"
|
||||
|
||||
@ -1,16 +0,0 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
tags = ['scheduled']
|
||||
) }}
|
||||
|
||||
WITH validators AS (
|
||||
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
{{ ref('silver__validator_labels') }}
|
||||
)
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
validators
|
||||
@ -1,16 +0,0 @@
|
||||
version: 2
|
||||
|
||||
models:
|
||||
- name: core__dim_validator_labels
|
||||
description: |-
|
||||
Deprecating soon: This is a notice that we're replacing this table with **FLOW.GOV.DIM_VALIDATOR_LABELS**. Please migrate queries to the new table by **9/14/23**. There will be no column changes or any other changes of any kind.
|
||||
|
||||
columns:
|
||||
- name: NODE_ID
|
||||
description: "{{ doc('node_id') }}"
|
||||
|
||||
- name: VALIDATOR_TYPE
|
||||
description: "{{ doc('validator_type') }}"
|
||||
|
||||
- name: PROJECT_NAME
|
||||
description: "{{ doc('project_name') }}"
|
||||
@ -1,37 +0,0 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
tags = ['ez', 'scheduled'],
|
||||
meta={
|
||||
'database_tags':{
|
||||
'table': {
|
||||
'PURPOSE': 'STAKING'
|
||||
}
|
||||
}
|
||||
}
|
||||
) }}
|
||||
|
||||
WITH staking_actions AS (
|
||||
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
{{ ref('silver__staking_actions') }}
|
||||
),
|
||||
FINAL AS (
|
||||
SELECT
|
||||
tx_id,
|
||||
event_index,
|
||||
block_timestamp,
|
||||
block_height,
|
||||
tx_succeeded,
|
||||
delegator,
|
||||
action,
|
||||
amount,
|
||||
node_id
|
||||
FROM
|
||||
staking_actions
|
||||
)
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
FINAL
|
||||
@ -1,31 +0,0 @@
|
||||
version: 2
|
||||
|
||||
models:
|
||||
- name: core__ez_staking_actions
|
||||
description: |-
|
||||
Deprecating soon: This is a notice that we're replacing this table with **FLOW.GOV.EZ_STAKING_ACTIONS**. Please migrate queries to the new table by **9/14/23**. There will be no column changes or any other changes of any kind.
|
||||
|
||||
columns:
|
||||
- name: tx_id
|
||||
description: "{{ doc('tx_id') }}"
|
||||
|
||||
- name: block_timestamp
|
||||
description: "{{ doc('block_timestamp') }}"
|
||||
|
||||
- name: block_height
|
||||
description: "{{ doc('block_height') }}"
|
||||
|
||||
- name: tx_succeeded
|
||||
description: "{{ doc('tx_succeeded') }}"
|
||||
|
||||
- name: delegator
|
||||
description: "{{ doc('delegator') }}"
|
||||
|
||||
- name: action
|
||||
description: "{{ doc('action') }}"
|
||||
|
||||
- name: amount
|
||||
description: "{{ doc('amount') }}"
|
||||
|
||||
- name: node_id
|
||||
description: "{{ doc('node_id') }}"
|
||||
@ -1,62 +0,0 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
meta={
|
||||
'database_tags':{
|
||||
'table': {
|
||||
'PURPOSE': 'NFT, ALLDAY'
|
||||
}
|
||||
}
|
||||
},
|
||||
tags = ['scheduled']
|
||||
) }}
|
||||
|
||||
WITH allday AS (
|
||||
|
||||
SELECT
|
||||
nft_id,
|
||||
nft_collection,
|
||||
nflallday_id,
|
||||
serial_number,
|
||||
moment_tier,
|
||||
total_circulation,
|
||||
moment_description,
|
||||
player,
|
||||
team,
|
||||
season,
|
||||
week,
|
||||
classification,
|
||||
play_type,
|
||||
moment_date,
|
||||
series,
|
||||
set_name,
|
||||
video_urls,
|
||||
moment_stats_full
|
||||
FROM
|
||||
{{ ref('silver__nft_allday_metadata') }}
|
||||
EXCEPT
|
||||
SELECT
|
||||
nft_id,
|
||||
nft_collection,
|
||||
nflallday_id,
|
||||
serial_number,
|
||||
moment_tier,
|
||||
total_circulation,
|
||||
moment_description,
|
||||
player,
|
||||
team,
|
||||
season,
|
||||
week,
|
||||
classification,
|
||||
play_type,
|
||||
moment_date,
|
||||
series,
|
||||
set_name,
|
||||
video_urls,
|
||||
moment_stats_full
|
||||
FROM
|
||||
{{ ref('silver__allday_moments_metadata_error') }}
|
||||
)
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
allday
|
||||
@ -1,58 +0,0 @@
|
||||
version: 2
|
||||
|
||||
models:
|
||||
- name: core__dim_allday_metadata
|
||||
description: |-
|
||||
Deprecating soon: This is a notice that we're replacing this table with **FLOW.NFT.DIM_ALLDAY_METADATA**. Please migrate queries to the new table by **9/14/23**. There will be no column changes or any other changes of any kind.
|
||||
|
||||
columns:
|
||||
- name: NFT_ID
|
||||
description: "{{ doc('nft_id') }}"
|
||||
|
||||
- name: NFT_COLLECTION
|
||||
description: "{{ doc('nft_collection') }}"
|
||||
|
||||
- name: NFLALLDAY_ID
|
||||
description: "{{ doc('nflallday_id') }}"
|
||||
|
||||
- name: SERIAL_NUMBER
|
||||
description: "{{ doc('serial_number') }}"
|
||||
|
||||
- name: TOTAL_CIRCULATION
|
||||
description: "{{ doc('total_circulation') }}"
|
||||
|
||||
- name: MOMENT_DESCRIPTION
|
||||
description: "{{ doc('moment_description') }}"
|
||||
|
||||
- name: PLAYER
|
||||
description: "{{ doc('player') }}"
|
||||
|
||||
- name: TEAM
|
||||
description: "{{ doc('team') }}"
|
||||
|
||||
- name: SEASON
|
||||
description: "{{ doc('season') }}"
|
||||
|
||||
- name: WEEK
|
||||
description: "{{ doc('week') }}"
|
||||
|
||||
- name: CLASSIFICATION
|
||||
description: "{{ doc('classification') }}"
|
||||
|
||||
- name: PLAY_TYPE
|
||||
description: "{{ doc('play_type') }}"
|
||||
|
||||
- name: MOMENT_DATE
|
||||
description: "{{ doc('moment_date') }}"
|
||||
|
||||
- name: SERIES
|
||||
description: "{{ doc('series') }}"
|
||||
|
||||
- name: SET_NAME
|
||||
description: "{{ doc('set_name') }}"
|
||||
|
||||
- name: VIDEO_URLS
|
||||
description: "{{ doc('video_urls') }}"
|
||||
|
||||
- name: MOMENT_STATS_FULL
|
||||
description: "{{ doc('moment_stats_full') }}"
|
||||
@ -1,36 +0,0 @@
|
||||
{{ config (
|
||||
materialized = 'view',
|
||||
tags = ['nft', 'dapper', 'scheduled'],
|
||||
meta = {
|
||||
'database_tags':{
|
||||
'table': {
|
||||
'PURPOSE': 'NFT, ALLDAY, GOLAZOS, TOPSHOT'
|
||||
}
|
||||
}
|
||||
}
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
event_contract AS nft_collection,
|
||||
nft_id,
|
||||
serial_number,
|
||||
max_mint_size,
|
||||
play_id,
|
||||
series_id,
|
||||
series_name,
|
||||
set_id,
|
||||
set_name,
|
||||
edition_id,
|
||||
tier,
|
||||
metadata
|
||||
FROM
|
||||
{{ ref('silver__nft_moment_metadata_final') }}
|
||||
WHERE
|
||||
NOT (
|
||||
nft_collection = 'A.87ca73a41bb50ad5.Golazos'
|
||||
AND edition_id = 486
|
||||
)
|
||||
AND NOT (
|
||||
nft_collection = 'A.e4cf4bdc1751c65d.AllDay'
|
||||
AND edition_id = 1486
|
||||
)
|
||||
@ -1,43 +0,0 @@
|
||||
version: 2
|
||||
|
||||
models:
|
||||
- name: core__dim_moment_metadata
|
||||
description: |-
|
||||
Deprecating soon: This is a notice that we're replacing this table with **FLOW.NFT.DIM_MOMENT_METADATA**. Please migrate queries to the new table by **9/14/23**. There will be no column changes or any other changes of any kind.
|
||||
|
||||
columns:
|
||||
- name: nft_collection
|
||||
description: "{{ doc('nft_collection') }}"
|
||||
|
||||
- name: nft_id
|
||||
description: "{{ doc('nft_id') }}"
|
||||
|
||||
- name: serial_number
|
||||
description: "{{ doc('serial_number') }}"
|
||||
|
||||
- name: max_mint_size
|
||||
description: "{{ doc('max_mint_size') }}"
|
||||
|
||||
- name: play_id
|
||||
description: "{{ doc('play_id') }}"
|
||||
|
||||
- name: series_id
|
||||
description: "{{ doc('series_id') }}"
|
||||
|
||||
- name: series_name
|
||||
description: "{{ doc('series_name') }}"
|
||||
|
||||
- name: set_id
|
||||
description: "{{ doc('set_id') }}"
|
||||
|
||||
- name: set_name
|
||||
description: "{{ doc('set_name') }}"
|
||||
|
||||
- name: edition_id
|
||||
description: "{{ doc('edition_id') }}"
|
||||
|
||||
- name: tier
|
||||
description: "{{ doc('tier') }}"
|
||||
|
||||
- name: metadata
|
||||
description: "{{ doc('metadata') }}"
|
||||
@ -1,40 +0,0 @@
|
||||
{{ config (
|
||||
materialized = 'view',
|
||||
meta={
|
||||
'database_tags':{
|
||||
'table': {
|
||||
'PURPOSE': 'NFT, TOPSHOT'
|
||||
}
|
||||
}
|
||||
},
|
||||
tags = ['scheduled']
|
||||
) }}
|
||||
|
||||
WITH topshot AS (
|
||||
|
||||
SELECT
|
||||
nft_id,
|
||||
nft_collection,
|
||||
nbatopshot_id,
|
||||
serial_number,
|
||||
total_circulation,
|
||||
moment_description,
|
||||
player,
|
||||
team,
|
||||
season,
|
||||
play_category,
|
||||
play_type,
|
||||
moment_date,
|
||||
set_name,
|
||||
set_series_number,
|
||||
video_urls,
|
||||
moment_stats_full,
|
||||
player_stats_game,
|
||||
player_stats_season_to_date
|
||||
FROM
|
||||
{{ ref('silver__nft_topshot_metadata') }}
|
||||
)
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
topshot
|
||||
@ -1,61 +0,0 @@
|
||||
version: 2
|
||||
|
||||
models:
|
||||
- name: core__dim_topshot_metadata
|
||||
description: |-
|
||||
Deprecating soon: This is a notice that we're replacing this table with **FLOW.NFT.DIM_TOPSHOT_METADATA**. Please migrate queries to the new table by **9/14/23**. There will be no column changes or any other changes of any kind.
|
||||
|
||||
columns:
|
||||
- name: NFT_ID
|
||||
description: "{{ doc('nft_id') }}"
|
||||
|
||||
- name: NFT_COLLECTION
|
||||
description: "{{ doc('nft_collection') }}"
|
||||
|
||||
- name: NBATOPSHOT_ID
|
||||
description: "{{ doc('nbatopshot_id') }}"
|
||||
|
||||
- name: SERIAL_NUMBER
|
||||
description: "{{ doc('serial_number') }}"
|
||||
|
||||
- name: TOTAL_CIRCULATION
|
||||
description: "{{ doc('total_circulation') }}"
|
||||
|
||||
- name: MOMENT_DESCRIPTION
|
||||
description: "{{ doc('moment_description') }}"
|
||||
|
||||
- name: PLAYER
|
||||
description: "{{ doc('player') }}"
|
||||
|
||||
- name: TEAM
|
||||
description: "{{ doc('team') }}"
|
||||
|
||||
- name: SEASON
|
||||
description: "{{ doc('season') }}"
|
||||
|
||||
- name: PLAY_CATEGORY
|
||||
description: "{{ doc('play_category') }}"
|
||||
|
||||
- name: PLAY_TYPE
|
||||
description: "{{ doc('play_type') }}"
|
||||
|
||||
- name: MOMENT_DATE
|
||||
description: "{{ doc('moment_date') }}"
|
||||
|
||||
- name: SET_NAME
|
||||
description: "{{ doc('set_name') }}"
|
||||
|
||||
- name: SET_SERIES_NUMBER
|
||||
description: "{{ doc('set_series_number') }}"
|
||||
|
||||
- name: VIDEO_URLS
|
||||
description: "{{ doc('video_urls') }}"
|
||||
|
||||
- name: MOMENT_STATS_FULL
|
||||
description: "{{ doc('moment_stats_full') }}"
|
||||
|
||||
- name: PLAYER_STATS_GAME
|
||||
description: "{{ doc('player_stats_game') }}"
|
||||
|
||||
- name: PLAYER_STATS_SEASON_TO_DATE
|
||||
description: "{{ doc('player_stats_season_to_date') }}"
|
||||
@ -1,41 +0,0 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
tags = ['nft', 'ez', 'scheduled'],
|
||||
meta={
|
||||
'database_tags':{
|
||||
'table': {
|
||||
'PURPOSE': 'NFT'
|
||||
}
|
||||
}
|
||||
}
|
||||
) }}
|
||||
|
||||
WITH silver_nfts AS (
|
||||
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
{{ ref('silver__nft_sales') }}
|
||||
),
|
||||
gold_nfts AS (
|
||||
SELECT
|
||||
tx_id,
|
||||
block_height,
|
||||
block_timestamp,
|
||||
marketplace,
|
||||
nft_collection,
|
||||
nft_id,
|
||||
buyer,
|
||||
seller,
|
||||
price,
|
||||
currency,
|
||||
tx_succeeded,
|
||||
tokenflow,
|
||||
counterparties
|
||||
FROM
|
||||
silver_nfts
|
||||
)
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
gold_nfts
|
||||
@ -1,46 +0,0 @@
|
||||
version: 2
|
||||
|
||||
models:
|
||||
- name: core__ez_nft_sales
|
||||
description: |-
|
||||
Deprecating soon: This is a notice that we're replacing this table with **FLOW.NFT.EZ_NFT_SALES**. Please migrate queries to the new table by **9/14/23**. There will be no column changes or any other changes of any kind.
|
||||
|
||||
columns:
|
||||
- name: TX_ID
|
||||
description: "{{ doc('tx_id') }}"
|
||||
|
||||
- name: BLOCK_HEIGHT
|
||||
description: "{{ doc('block_height') }}"
|
||||
|
||||
- name: BLOCK_TIMESTAMP
|
||||
description: "{{ doc('block_timestamp') }}"
|
||||
|
||||
- name: MARKETPLACE
|
||||
description: "{{ doc('marketplace') }}"
|
||||
|
||||
- name: NFT_COLLECTION
|
||||
description: "{{ doc('nft_collection') }}"
|
||||
|
||||
- name: NFT_ID
|
||||
description: "{{ doc('nft_id') }}"
|
||||
|
||||
- name: BUYER
|
||||
description: "{{ doc('buyer') }}"
|
||||
|
||||
- name: SELLER
|
||||
description: "{{ doc('seller') }}"
|
||||
|
||||
- name: PRICE
|
||||
description: "{{ doc('price') }}"
|
||||
|
||||
- name: CURRENCY
|
||||
description: "{{ doc('currency') }}"
|
||||
|
||||
- name: TX_SUCCEEDED
|
||||
description: "{{ doc('tx_succeeded') }}"
|
||||
|
||||
- name: TOKENFLOW
|
||||
description: "{{ doc('tokenflow') }}"
|
||||
|
||||
- name: COUNTERPARTIES
|
||||
description: "{{ doc('counterparties') }}"
|
||||
@ -1,57 +0,0 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
tags = ['scheduled']
|
||||
) }}
|
||||
|
||||
WITH api AS (
|
||||
|
||||
SELECT
|
||||
recorded_hour,
|
||||
id,
|
||||
token,
|
||||
OPEN,
|
||||
high,
|
||||
low,
|
||||
CLOSE,
|
||||
provider
|
||||
FROM
|
||||
{{ ref('silver__prices_hourly') }}
|
||||
),
|
||||
swaps AS (
|
||||
SELECT
|
||||
recorded_hour,
|
||||
id,
|
||||
CASE
|
||||
WHEN id = 'A.1654653399040a61.FlowToken' THEN 'Flow'
|
||||
WHEN id = 'A.cfdd90d4a00f7b5b.TeleportedTetherToken' THEN 'USDT'
|
||||
WHEN id = 'A.3c5959b568896393.FUSD' THEN 'FUSD'
|
||||
WHEN id = 'A.0f9df91c9121c460.BloctoToken' THEN 'Blocto'
|
||||
WHEN id = 'A.d01e482eb680ec9f.REVV' THEN 'Revv'
|
||||
WHEN id = 'A.b19436aae4d94622.FiatToken' THEN 'USDC'
|
||||
WHEN id = 'A.142fa6570b62fd97.StarlyToken' THEN 'Starly'
|
||||
WHEN id = 'A.475755d2c9dccc3a.TeleportedSportiumToken' THEN 'Sportium'
|
||||
ELSE NULL -- will trigger alert if swaps model picks up another token
|
||||
END AS token,
|
||||
OPEN,
|
||||
high,
|
||||
low,
|
||||
CLOSE,
|
||||
provider
|
||||
FROM
|
||||
{{ ref('silver__prices_swaps_hourly') }}
|
||||
),
|
||||
FINAL AS (
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
api
|
||||
UNION
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
swaps
|
||||
)
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
FINAL
|
||||
@ -1,32 +0,0 @@
|
||||
|
||||
version: 2
|
||||
|
||||
models:
|
||||
- name: core__fact_hourly_prices
|
||||
description: |-
|
||||
Deprecating soon: This is a notice that we're replacing this table with **FLOW.PRICE.FACT_HOURLY_PRICES**. Please migrate queries to the new table by **9/14/23**. There will be no column changes or any other changes of any kind.
|
||||
|
||||
columns:
|
||||
- name: RECORDED_HOUR
|
||||
description: "{{ doc('recorded_hour') }}"
|
||||
|
||||
- name: ID
|
||||
description: "{{ doc('asset_id') }}"
|
||||
|
||||
- name: TOKEN
|
||||
description: "{{ doc('token') }}"
|
||||
|
||||
- name: OPEN
|
||||
description: "{{ doc('open') }}"
|
||||
|
||||
- name: HIGH
|
||||
description: "{{ doc('high') }}"
|
||||
|
||||
- name: LOW
|
||||
description: "{{ doc('low') }}"
|
||||
|
||||
- name: CLOSE
|
||||
description: "{{ doc('asset_id') }}"
|
||||
|
||||
- name: PROVIDER
|
||||
description: "{{ doc('provider') }}"
|
||||
@ -1,63 +0,0 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
tags = ['scheduled']
|
||||
) }}
|
||||
|
||||
WITH token_labels AS (
|
||||
|
||||
SELECT
|
||||
token,
|
||||
UPPER(symbol) AS symbol,
|
||||
token_contract
|
||||
FROM
|
||||
{{ ref('seeds__token_labels') }}
|
||||
),
|
||||
prices AS (
|
||||
SELECT
|
||||
recorded_at AS TIMESTAMP,
|
||||
token,
|
||||
UPPER(symbol) AS symbol,
|
||||
price_usd,
|
||||
source
|
||||
FROM
|
||||
{{ this.database }}.silver.prices
|
||||
),
|
||||
prices_swaps AS (
|
||||
SELECT
|
||||
tx_id,
|
||||
block_timestamp AS TIMESTAMP,
|
||||
token_contract,
|
||||
swap_price AS price_usd,
|
||||
source
|
||||
FROM
|
||||
{{ ref('silver__prices_swaps') }}
|
||||
),
|
||||
viewnion AS (
|
||||
SELECT
|
||||
TIMESTAMP,
|
||||
p.token,
|
||||
p.symbol,
|
||||
l.token_contract,
|
||||
price_usd,
|
||||
source,
|
||||
NULL as tx_id
|
||||
FROM
|
||||
prices p
|
||||
LEFT JOIN token_labels l USING (symbol)
|
||||
UNION
|
||||
SELECT
|
||||
TIMESTAMP,
|
||||
l.token,
|
||||
l.symbol,
|
||||
ps.token_contract,
|
||||
price_usd,
|
||||
source,
|
||||
tx_id
|
||||
FROM
|
||||
prices_swaps ps
|
||||
LEFT JOIN token_labels l USING (token_contract)
|
||||
)
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
viewnion
|
||||
@ -1,26 +0,0 @@
|
||||
version: 2
|
||||
|
||||
models:
|
||||
- name: core__fact_prices
|
||||
description: |-
|
||||
Deprecating soon: This is a notice that we're replacing this table with **FLOW.PRICE.FACT_PRICES**. Please migrate queries to the new table by **9/14/23**. There will be no column changes or any other changes of any kind.
|
||||
|
||||
|
||||
columns:
|
||||
- name: TIMESTAMP
|
||||
description: "{{ doc('timestamp') }}"
|
||||
|
||||
- name: TOKEN
|
||||
description: "{{ doc('token') }}"
|
||||
|
||||
- name: SYMBOL
|
||||
description: "{{ doc('symbol') }}"
|
||||
|
||||
- name: TOKEN_CONTRACT
|
||||
description: "{{ doc('token_contract') }}"
|
||||
|
||||
- name: PRICE_USD
|
||||
description: "{{ doc('price_usd') }}"
|
||||
|
||||
- name: SOURCE
|
||||
description: "{{ doc('source') }}"
|
||||
Loading…
Reference in New Issue
Block a user