Skip to content

Commit

Permalink
Update and rename dbt_subprojects/nft/models/_sector/trades/chains/ro…
Browse files Browse the repository at this point in the history
…nin/platforms/_schema.yml to dbt_subprojects/nft/models/_sector/trades/chains/ronin/nft_ronin_base_trades.sql
  • Loading branch information
peterrliem authored Dec 19, 2024
1 parent 3738876 commit 87446b7
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
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

This file was deleted.

0 comments on commit 87446b7

Please sign in to comment.