-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update and rename dbt_subprojects/nft/models/_sector/trades/chains/ro…
…nin/platforms/_schema.yml to dbt_subprojects/nft/models/_sector/trades/chains/ronin/nft_ronin_base_trades.sql
- Loading branch information
1 parent
3738876
commit 87446b7
Showing
2 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
dbt_subprojects/nft/models/_sector/trades/chains/ronin/nft_ronin_base_trades.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{{ config( | ||
schema = 'nft_ronin', | ||
alias = 'base_trades', | ||
materialized = 'view' | ||
) | ||
}} | ||
-- (project, project_version, model) | ||
{% set nft_models = [ | ||
ref('mavis_ronin_base_trades') | ||
] %} | ||
|
||
with base_union as ( | ||
SELECT * FROM ( | ||
{% for nft_model in nft_models %} | ||
SELECT | ||
blockchain, | ||
project, | ||
project_version, | ||
block_time, | ||
block_date, | ||
block_month, | ||
block_number, | ||
tx_hash, | ||
project_contract_address, | ||
trade_category, | ||
trade_type, | ||
buyer, | ||
seller, | ||
nft_contract_address, | ||
nft_token_id, | ||
nft_amount, | ||
price_raw, | ||
currency_contract, | ||
platform_fee_amount_raw, | ||
royalty_fee_amount_raw, | ||
platform_fee_address, | ||
royalty_fee_address, | ||
sub_tx_trade_id, | ||
tx_from, | ||
tx_to, | ||
tx_data_marker | ||
FROM {{ nft_model }} | ||
{% if not loop.last %} | ||
UNION ALL | ||
{% endif %} | ||
{% endfor %} | ||
) | ||
) | ||
select * from base_union |
1 change: 0 additions & 1 deletion
1
dbt_subprojects/nft/models/_sector/trades/chains/ronin/platforms/_schema.yml
This file was deleted.
Oops, something went wrong.