mirror of
https://github.com/FlipsideCrypto/polygon-models.git
synced 2026-02-06 16:11:59 +00:00
lables, docs update (#8)
This commit is contained in:
parent
594d74bc1c
commit
19ed519e29
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -2,6 +2,8 @@
|
||||
|
||||
# Welcome to the Flipside Crypto Polygon Models Documentation!
|
||||
|
||||
# NOTE: Data is in 'lite mode' - meaning, histrorical data has not yet been backfilled. Please see `min(block_timestamp)`
|
||||
|
||||
## **What is Flipside?**
|
||||
|
||||
[Flipside Crypto](https://flipsidecrypto.xyz/earn) provides Community Enabled Crypto Analytics, allowing our users to create and share data insights on the crypto projects they care most about.
|
||||
@ -23,10 +25,11 @@ The documentation included here details the design of the Polygon tables and vie
|
||||
|
||||
### **Quick Links to Table Documentation**
|
||||
|
||||
- [fact_blocks]()
|
||||
- [fact_event_logs]()
|
||||
- [fact_traces]()
|
||||
- [fact_transactions]()
|
||||
- [fact_blocks](https://flipsidecrypto.github.io/polygon-models/#!/model/model.polygon_models.core__fact_blocks)
|
||||
- [fact_event_logs](https://flipsidecrypto.github.io/polygon-models/#!/model/model.polygon_models.core__fact_event_logs)
|
||||
- [fact_traces](https://flipsidecrypto.github.io/polygon-models/#!/model/model.polygon_models.core__fact_traces)
|
||||
- [fact_transactions](https://flipsidecrypto.github.io/polygon-models/#!/model/model.polygon_models.core__fact_transactions)
|
||||
- [dim_lables](https://flipsidecrypto.github.io/polygon-models/#!/model/model.polygon_models.core__dim_labels)
|
||||
|
||||
## **Data Model Overview**
|
||||
|
||||
|
||||
5
models/doc_descriptions/labels/matic_label.md
Normal file
5
models/doc_descriptions/labels/matic_label.md
Normal file
@ -0,0 +1,5 @@
|
||||
{% docs matic_project_name %}
|
||||
|
||||
The name of the project for this address.
|
||||
|
||||
{% enddocs %}
|
||||
5
models/doc_descriptions/labels/matic_label_address.md
Normal file
5
models/doc_descriptions/labels/matic_label_address.md
Normal file
@ -0,0 +1,5 @@
|
||||
{% docs matic_label_address %}
|
||||
|
||||
Address that the label is for. This is the field that should be used to join other tables with labels.
|
||||
|
||||
{% enddocs %}
|
||||
@ -0,0 +1,5 @@
|
||||
{% docs matic_label_address_name %}
|
||||
|
||||
The most granular label for this address.
|
||||
|
||||
{% enddocs %}
|
||||
5
models/doc_descriptions/labels/matic_label_blockchain.md
Normal file
5
models/doc_descriptions/labels/matic_label_blockchain.md
Normal file
@ -0,0 +1,5 @@
|
||||
{% docs matic_label_blockchain %}
|
||||
|
||||
The name of the blockchain.
|
||||
|
||||
{% enddocs %}
|
||||
5
models/doc_descriptions/labels/matic_label_creator.md
Normal file
5
models/doc_descriptions/labels/matic_label_creator.md
Normal file
@ -0,0 +1,5 @@
|
||||
{% docs matic_label_creator %}
|
||||
|
||||
The name of the creator of the label.
|
||||
|
||||
{% enddocs %}
|
||||
5
models/doc_descriptions/labels/matic_label_subtype.md
Normal file
5
models/doc_descriptions/labels/matic_label_subtype.md
Normal file
@ -0,0 +1,5 @@
|
||||
{% docs matic_label_subtype %}
|
||||
|
||||
A sub-category nested within label type providing further detail.
|
||||
|
||||
{% enddocs %}
|
||||
5
models/doc_descriptions/labels/matic_label_type.md
Normal file
5
models/doc_descriptions/labels/matic_label_type.md
Normal file
@ -0,0 +1,5 @@
|
||||
{% docs matic_label_type %}
|
||||
|
||||
A high-level category describing the addresses main function or ownership.
|
||||
|
||||
{% enddocs %}
|
||||
5
models/doc_descriptions/labels/matic_labels_table_doc.md
Normal file
5
models/doc_descriptions/labels/matic_labels_table_doc.md
Normal file
@ -0,0 +1,5 @@
|
||||
{% docs matic_labels_table %}
|
||||
|
||||
This table contains labels for addresses on the Polygon Blockchain.
|
||||
|
||||
{% enddocs %}
|
||||
22
models/gold/core__dim_labels.sql
Normal file
22
models/gold/core__dim_labels.sql
Normal file
@ -0,0 +1,22 @@
|
||||
{{ config(
|
||||
materialized = 'view',
|
||||
persist_docs ={ "relation": true,
|
||||
"columns": true }
|
||||
) }}
|
||||
|
||||
SELECT
|
||||
blockchain,
|
||||
creator,
|
||||
address,
|
||||
address_name,
|
||||
label_type,
|
||||
label_subtype,
|
||||
project_name
|
||||
FROM
|
||||
{{ source(
|
||||
'crosschain',
|
||||
'address_labels'
|
||||
) }}
|
||||
WHERE
|
||||
blockchain = 'polygon'
|
||||
AND address LIKE '0x%'
|
||||
57
models/gold/core__dim_labels.yml
Normal file
57
models/gold/core__dim_labels.yml
Normal file
@ -0,0 +1,57 @@
|
||||
version: 2
|
||||
models:
|
||||
- name: core__dim_labels
|
||||
description: '{{ doc("matic_labels_table") }}'
|
||||
tests:
|
||||
- dbt_utils.unique_combination_of_columns:
|
||||
combination_of_columns:
|
||||
- BLOCKCHAIN
|
||||
- CREATOR
|
||||
- ADDRESS
|
||||
columns:
|
||||
- name: BLOCKCHAIN
|
||||
description: '{{ doc("matic_label_blockchain") }}'
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_set:
|
||||
value_set: ['polygon']
|
||||
- name: CREATOR
|
||||
description: '{{ doc("matic_label_creator") }}'
|
||||
tests:
|
||||
- not_null
|
||||
- name: ADDRESS
|
||||
description: '{{ doc("matic_label_address") }}'
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_match_regex:
|
||||
regex: 0[xX][0-9a-fA-F]+
|
||||
- name: ADDRESS_NAME
|
||||
description: '{{ doc("matic_labels_table") }}'
|
||||
tests:
|
||||
- dbt_expectations.expect_column_values_to_be_in_type_list:
|
||||
column_type_list:
|
||||
- STRING
|
||||
- VARCHAR
|
||||
- name: LABEL_TYPE
|
||||
description: '{{ doc("matic_label_type") }}'
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_set:
|
||||
value_set: ['flotsam', 'nft', 'defi', 'dex', 'cex', 'dapp', 'token', 'operator', 'layer2', 'chadmin', 'project']
|
||||
- name: LABEL_SUBTYPE
|
||||
description: '{{ doc("matic_label_subtype") }}'
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_type_list:
|
||||
column_type_list:
|
||||
- STRING
|
||||
- VARCHAR
|
||||
- name: PROJECT_NAME
|
||||
description: '{{ doc("matic_project_name") }}'
|
||||
tests:
|
||||
- not_null
|
||||
- dbt_expectations.expect_column_values_to_be_in_type_list:
|
||||
column_type_list:
|
||||
- STRING
|
||||
- VARCHAR
|
||||
|
||||
@ -7,4 +7,9 @@ sources:
|
||||
tables:
|
||||
- name: polygon_blocks
|
||||
- name: polygon_txs
|
||||
- name: crosschain
|
||||
database: flipside_prod_db
|
||||
schema: crosschain
|
||||
tables:
|
||||
- name: address_labels
|
||||
|
||||
Loading…
Reference in New Issue
Block a user