-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ufc strike metadata, plus organized nft folder better * upd db tag on gold * upd col name to serial number * del listing id * add back listing id
- Loading branch information
Showing
37 changed files
with
206 additions
and
3 deletions.
There are no files selected for viewing
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,5 @@ | ||
{% docs _filename %} | ||
|
||
The filename of the source of the data | ||
|
||
{% enddocs %} |
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,5 @@ | ||
{% docs inserted_timestamp %} | ||
|
||
The timestamp at which the record was initially created and inserted into this table. | ||
|
||
{% enddocs %} |
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,5 @@ | ||
{% docs invocation_id %} | ||
|
||
A job ID to identify the run that last modified a record. | ||
|
||
{% enddocs %} |
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,5 @@ | ||
{% docs modified_timestamp %} | ||
|
||
The timestamp at which this record was last modified by an internal process. | ||
|
||
{% enddocs %} |
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,23 @@ | ||
{{ config( | ||
materialized = 'view', | ||
meta={ | ||
'database_tags':{ | ||
'table': { | ||
'PURPOSE': 'NFT, UFCSTRIKE' | ||
} | ||
} | ||
}, | ||
tags = ['scheduled_non_core'] | ||
) }} | ||
|
||
SELECT | ||
nft_id, | ||
serial_number, | ||
listing_id, | ||
set_name, | ||
metadata, | ||
inserted_timestamp, | ||
modified_timestamp, | ||
invocation_id | ||
FROM | ||
{{ ref('silver__nft_ufc_strike_metadata') }} |
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,43 @@ | ||
version: 2 | ||
|
||
models: | ||
- name: nft__dim_ufc_strike_metadata | ||
description: |- | ||
UFC Strike NFT Metadata | ||
columns: | ||
- name: NFT_ID | ||
description: "{{ doc('nft_id')}}" | ||
tests: | ||
- not_null | ||
- unique | ||
|
||
- name: SERIAL_NUMBER | ||
description: "{{ doc('serial_number')}}" | ||
tests: | ||
- not_null | ||
|
||
- name: LISTING_ID | ||
description: "{{ doc('listing_id')}}" | ||
tests: | ||
- not_null | ||
|
||
- name: SET_NAME | ||
description: "{{ doc('set_name')}}" | ||
tests: | ||
- not_null | ||
|
||
- name: METADATA | ||
description: "{{ doc('metadata')}}" | ||
tests: | ||
- not_null | ||
|
||
- name: INSERTED_TIMESTAMP | ||
description: "{{doc('inserted_timestamp')}}" | ||
tests: | ||
- not_null | ||
|
||
- name: MODIFIED_TIMESTAMP | ||
description: "{{doc('modified_timestamp')}}" | ||
tests: | ||
- not_null |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,5 @@ | ||
# On-chain Metadata | ||
|
||
A number of projects on Flow post moment metadata to the chain when a moment is minted. This occurrs over a number of different categories. A moment typically is part of a set, and edition, and/or a series. A moment itself is a representation of a play in some sport or event. Thus, a moment may have a play id, set id, series id, edition id, and more. So, for a full representation of a moment's metadata, each of these components is required. | ||
|
||
The models in this folder were built in at the end of 2022/early 2023 to parse a few projects that had begun to store metadata on chain. As more projects move to this approach, these models will be updated. |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
49 changes: 49 additions & 0 deletions
49
models/silver/nft/metadata/silver__nft_ufc_strike_metadata.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( | ||
materialized = 'incremental', | ||
incremental_strategy = 'merge', | ||
unique_key = ['nft_id'], | ||
merge_exclude_columns = ["inserted_timestamp"], | ||
tags = ['scheduled_non_core'] | ||
) }} | ||
|
||
WITH metadata AS ( | ||
|
||
SELECT | ||
token_id, | ||
edition, | ||
owner, | ||
listing_id, | ||
set_name, | ||
metadata, | ||
_inserted_timestamp, | ||
_filename | ||
FROM | ||
{{ source( | ||
'flow_bronze', | ||
'ufc_strike_metadata' | ||
) }} | ||
|
||
{% if is_incremental() %} | ||
WHERE | ||
_inserted_timestamp >= ( | ||
SELECT | ||
MAX(_inserted_timestamp) | ||
FROM | ||
{{ this }} | ||
) | ||
{% endif %} | ||
) | ||
SELECT | ||
token_id AS nft_id, | ||
edition AS serial_number, | ||
owner, | ||
listing_id, | ||
set_name, | ||
metadata, | ||
_inserted_timestamp, | ||
_filename, | ||
SYSDATE() AS inserted_timestamp, | ||
SYSDATE() AS modified_timestamp, | ||
'{{invocation_id}}' AS invocation_id | ||
FROM | ||
metadata |
59 changes: 59 additions & 0 deletions
59
models/silver/nft/metadata/silver__nft_ufc_strike_metadata.yml
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,59 @@ | ||
version: 2 | ||
|
||
models: | ||
- name: silver__nft_ufc_strike_metadata | ||
description: |- | ||
UFC Strike NFT Metadata | ||
columns: | ||
- name: NFT_ID | ||
description: "{{ doc('nft_id')}}" | ||
tests: | ||
- not_null | ||
- unique | ||
|
||
- name: SERIAL_NUMBER | ||
description: "{{ doc('serial_number')}}" | ||
tests: | ||
- not_null | ||
|
||
- name: OWNER | ||
description: "The last known owner of this NFT at time of data pull" | ||
tests: | ||
- not_null | ||
|
||
- name: LISTING_ID | ||
description: "{{ doc('listing_id')}}" | ||
tests: | ||
- not_null | ||
|
||
- name: SET_NAME | ||
description: "{{ doc('set_name')}}" | ||
tests: | ||
- not_null | ||
|
||
- name: METADATA | ||
description: "{{ doc('metadata')}}" | ||
tests: | ||
- not_null | ||
|
||
- name: _INSERTED_TIMESTAMP | ||
description: "{{doc('_inserted_timestamp')}}" | ||
|
||
- name: _FILENAME | ||
description: "{{doc('_filename')}}" | ||
|
||
- name: INSERTED_TIMESTAMP | ||
description: "{{doc('inserted_timestamp')}}" | ||
tests: | ||
- not_null | ||
|
||
- name: MODIFIED_TIMESTAMP | ||
description: "{{doc('modified_timestamp')}}" | ||
tests: | ||
- not_null | ||
|
||
- name: INVOCATION_ID | ||
description: "{{doc('invocation_id')}}" | ||
tests: | ||
- not_null |
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