views on new metadata

This commit is contained in:
Jack Forgash 2023-09-28 10:00:34 -06:00
parent 8837710209
commit c5139b3afd
7 changed files with 142 additions and 0 deletions

View File

@ -0,0 +1,5 @@
{% docs series_title %}
Title of the NFT series.
{% enddocs %}

View File

@ -0,0 +1,20 @@
{{ config(
materialized = 'view',
tags = ['core', 'livequery', 'nearblocks']
) }}
WITH ft_contract_metadata AS (
SELECT
*
FROM
{{ ref('silver__ft_contract_metadata') }}
)
SELECT
contract_address,
NAME,
symbol,
decimals,
icon
FROM
ft_contract_metadata

View File

@ -0,0 +1,26 @@
version: 2
models:
- name: core__dim_ft_contract_metadata
description: |-
Fungible Token contract metadata provided by the Nearblocks NFT endpoint.
columns:
- name: CONTRACT_ADDRESS
description: "{{ doc('contract_address')}}"
- name: NAME
description: "{{ doc('name')}}"
- name: SYMBOL
description: "{{ doc('symbol')}}"
- name: DECIMALS
description: "{{ doc('decimals')}}"
- name: ICON
description: "{{ doc('icon')}}"
- name: DATA
description: "{{ doc('data')}}"

View File

@ -0,0 +1,21 @@
{{ config(
materialized = 'view',
tags = ['core', 'nft', 'livequery', 'nearblocks']
) }}
WITH nft_contract_metadata AS (
SELECT
*
FROM
{{ ref('silver__nft_contract_metadata') }}
)
SELECT
contract_address,
NAME,
symbol,
base_uri,
icon,
tokens
FROM
nft_contract_metadata

View File

@ -0,0 +1,25 @@
version: 2
models:
- name: nft__dim_nft_contract_metadata
description: |-
NFT Contract-level metadata provided by the Nearblocks NFT endpoint.
columns:
- name: CONTRACT_ADDRESS
description: "{{ doc('contract_address')}}"
- name: NAME
description: "{{ doc('name')}}"
- name: SYMBOL
description: "{{ doc('symbol')}}"
- name: BASE_URI
description: "{{ doc('base_uri')}}"
- name: ICON
description: "{{ doc('icon')}}"
- name: TOKENS
description: "{{ doc('tokens')}}"

View File

@ -0,0 +1,21 @@
{{ config(
materialized = 'view',
tags = ['core', 'nft', 'pagoda']
) }}
WITH series_metadata AS (
SELECT
*
FROM
{{ ref('silver__nft_series_metadata') }}
)
SELECT
contract_address,
series_id,
token_metadata :title :: STRING AS series_title,
metadata_id,
contract_metadata,
token_metadata
FROM
series_metadata

View File

@ -0,0 +1,24 @@
version: 2
models:
- name: nft__dim_nft_series_metadata
description: |-
NFT Series-level metadata provided by the Pagoda NFT endpoint.
columns:
- name: CONTRACT_ADDRESS
description: "{{ doc('contract_address')}}"
- name: SERIES_ID
description: "{{ doc('series_id')}}"
- name: SERIES_TITLE
description: "{{ doc('series_title')}}"
- name: METADATA_ID
description: "{{ doc('metadata_id')}}"
- name: CONTRACT_METADATA
description: "{{ doc('contract_metadata')}}"
- name: TOKEN_METADATA
description: "{{ doc('token_metadata')}}"