mirror of
https://github.com/FlipsideCrypto/osmosis-models.git
synced 2026-02-06 11:26:55 +00:00
An 1079 osmosis labels (#7)
* silver labels models - first pass * added descriptions * removed description column in table and re-referenced descriptions in .ymls * changed config to table set up * remove comment Co-authored-by: Desmond Hui <desmond@flipsidecrypto.com>
This commit is contained in:
parent
9272b2dca2
commit
89817b0c71
5
models/descriptions/address.md
Normal file
5
models/descriptions/address.md
Normal file
@ -0,0 +1,5 @@
|
||||
{% docs address %}
|
||||
|
||||
Address unique to an individual wallet, validator, or token.
|
||||
|
||||
{% enddocs %}
|
||||
5
models/descriptions/blockchain.md
Normal file
5
models/descriptions/blockchain.md
Normal file
@ -0,0 +1,5 @@
|
||||
{% docs blockchain %}
|
||||
|
||||
In this table, always Osmosis. Used to join to cross-chain tables.
|
||||
|
||||
{% enddocs %}
|
||||
5
models/descriptions/creator.md
Normal file
5
models/descriptions/creator.md
Normal file
@ -0,0 +1,5 @@
|
||||
{% docs creator %}
|
||||
|
||||
Name of the label creator - for now, this will always be "Flipside."
|
||||
|
||||
{% enddocs %}
|
||||
5
models/descriptions/label.md
Normal file
5
models/descriptions/label.md
Normal file
@ -0,0 +1,5 @@
|
||||
{% docs label %}
|
||||
|
||||
The label or name of the address.
|
||||
|
||||
{% enddocs %}
|
||||
5
models/descriptions/label_subtype.md
Normal file
5
models/descriptions/label_subtype.md
Normal file
@ -0,0 +1,5 @@
|
||||
{% docs label_subtype %}
|
||||
|
||||
Adds more detail to the label type.
|
||||
|
||||
{% enddocs %}
|
||||
5
models/descriptions/label_type.md
Normal file
5
models/descriptions/label_type.md
Normal file
@ -0,0 +1,5 @@
|
||||
{% docs label_type %}
|
||||
|
||||
A broad category that describes what a label is representing.
|
||||
|
||||
{% enddocs %}
|
||||
5
models/descriptions/project_name.md
Normal file
5
models/descriptions/project_name.md
Normal file
@ -0,0 +1,5 @@
|
||||
{% docs project_name %}
|
||||
|
||||
The name of the project the label belongs to.
|
||||
|
||||
{% enddocs %}
|
||||
5
models/descriptions/value.md
Normal file
5
models/descriptions/value.md
Normal file
@ -0,0 +1,5 @@
|
||||
{% docs value %}
|
||||
|
||||
Additional details about the validator or token in json format.
|
||||
|
||||
{% enddocs %}
|
||||
17
models/silver/silver__asset_metadata.sql
Normal file
17
models/silver/silver__asset_metadata.sql
Normal file
@ -0,0 +1,17 @@
|
||||
{{ config(
|
||||
materialized = 'table'
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
'osmosis' AS blockchain,
|
||||
base AS address,
|
||||
'flipside' AS creator,
|
||||
'token' AS label_type,
|
||||
'token_contract' AS label_subtype,
|
||||
name AS label,
|
||||
symbol AS project_name,
|
||||
denom_units AS value
|
||||
FROM {{ source(
|
||||
'osmosis_external',
|
||||
'asset_metadata_api'
|
||||
) }}
|
||||
46
models/silver/silver__asset_metadata.yml
Normal file
46
models/silver/silver__asset_metadata.yml
Normal file
@ -0,0 +1,46 @@
|
||||
version: 2
|
||||
models:
|
||||
- name: silver__asset_metadata
|
||||
tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- BLOCKCHAIN
|
||||
- CREATOR
|
||||
- ADDRESS
|
||||
columns:
|
||||
- name: BLOCKCHAIN
|
||||
description: "{{ doc('blockchain') }}"
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_set:
|
||||
value_set: ['osmosis']
|
||||
- name: ADDRESS
|
||||
description: "{{ doc('address') }}"
|
||||
tests:
|
||||
- not_null
|
||||
- name: CREATOR
|
||||
description: "{{ doc('creator') }}"
|
||||
tests:
|
||||
- not_null
|
||||
- name: LABEL_TYPE
|
||||
description: "{{ doc('label_type') }}"
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_set:
|
||||
value_set: ['token']
|
||||
- name: LABEL_SUBTYPE
|
||||
description: "{{ doc('label_subtype') }}"
|
||||
tests:
|
||||
- not_null
|
||||
- name: LABEL
|
||||
description: "{{ doc('label') }}"
|
||||
tests:
|
||||
- not_null
|
||||
- name: PROJECT_NAME
|
||||
description: "{{ doc('project_name') }}"
|
||||
tests:
|
||||
- not_null
|
||||
- name: VALUE
|
||||
description: "{{ doc('value') }}"
|
||||
tests:
|
||||
- not_null
|
||||
19
models/silver/silver__validator_metadata.sql
Normal file
19
models/silver/silver__validator_metadata.sql
Normal file
@ -0,0 +1,19 @@
|
||||
{{ config(
|
||||
materialized = 'table'
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
operator_address AS address,
|
||||
'osmosis' AS blockchain,
|
||||
'flipside' AS creator,
|
||||
'operator' AS label_type,
|
||||
'validator' AS label_subtype,
|
||||
moniker AS label,
|
||||
identity AS project_name,
|
||||
value
|
||||
FROM
|
||||
{{ source(
|
||||
'osmosis_external',
|
||||
'validator_metadata_api'
|
||||
) }}
|
||||
|
||||
50
models/silver/silver__validator_metadata.yml
Normal file
50
models/silver/silver__validator_metadata.yml
Normal file
@ -0,0 +1,50 @@
|
||||
version: 2
|
||||
models:
|
||||
- name: silver__validator_metadata
|
||||
tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- CREATOR
|
||||
- ADDRESS
|
||||
- BLOCKCHAIN
|
||||
columns:
|
||||
- name: ADDRESS
|
||||
description: "{{ doc('address') }}"
|
||||
tests:
|
||||
- not_null
|
||||
- name: BLOCKCHAIN
|
||||
description: "{{ doc('blockchain') }}"
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_set:
|
||||
value_set: ['osmosis']
|
||||
- name: CREATOR
|
||||
description: "{{ doc('creator') }}"
|
||||
tests:
|
||||
- not_null
|
||||
- name: LABEL_TYPE
|
||||
description: "{{ doc('label_type') }}"
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_set:
|
||||
value_set: ['operator']
|
||||
- name: LABEL_SUBTYPE
|
||||
description: "{{ doc('label_subtype') }}"
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_set:
|
||||
value_set: ['validator']
|
||||
- name: LABEL
|
||||
description: "{{ doc('label') }}"
|
||||
tests:
|
||||
- not_null
|
||||
- name: PROJECT_NAME
|
||||
description: "{{ doc('project_name') }}"
|
||||
tests:
|
||||
- not_null
|
||||
tests:
|
||||
- not_null
|
||||
- name: VALUE
|
||||
description: "{{ doc('value') }}"
|
||||
tests:
|
||||
- not_null
|
||||
@ -6,7 +6,7 @@ sources:
|
||||
schema: prod
|
||||
tables:
|
||||
- name: osmosis_blocks
|
||||
- name: osmosis_txs
|
||||
- name: osmosis_txs
|
||||
- name: osmosis_external
|
||||
schema: bronze
|
||||
loader: S3
|
||||
|
||||
Loading…
Reference in New Issue
Block a user