mirror of
https://github.com/FlipsideCrypto/aptos-models.git
synced 2026-02-06 09:26:44 +00:00
initial
This commit is contained in:
parent
611eb9c357
commit
6311090615
@ -1,13 +1,11 @@
|
||||
|
||||
# Please find and replace all instances of `xyz` with your project name.
|
||||
|
||||
## Profile Set Up
|
||||
|
||||
#### Use the following within profiles.yml
|
||||
----
|
||||
|
||||
```yml
|
||||
xyz:
|
||||
aptos:
|
||||
target: dev
|
||||
outputs:
|
||||
dev:
|
||||
@ -17,7 +15,7 @@ xyz:
|
||||
user: <USERNAME>
|
||||
password: <PASSWORD>
|
||||
region: <REGION>
|
||||
database: xyz_DEV
|
||||
database: aptos_DEV
|
||||
warehouse: <WAREHOUSE>
|
||||
schema: silver
|
||||
threads: 4
|
||||
@ -73,5 +71,5 @@ dbt run --var '{"UPDATE_SNOWFLAKE_TAGS":True}' -s models/core/core__fact_swaps.s
|
||||
|
||||
```
|
||||
select *
|
||||
from table(xyz.information_schema.tag_references('xyz.core.fact_blocks', 'table'));
|
||||
from table(aptos.information_schema.tag_references('aptos.core.fact_blocks', 'table'));
|
||||
```
|
||||
@ -1,6 +1,6 @@
|
||||
{% macro create_sps() %}
|
||||
{% if target.database == 'xyz' %}
|
||||
CREATE SCHEMA IF NOT EXISTS _internal;
|
||||
{{ sp_create_prod_clone('_internal') }};
|
||||
{% if target.database == 'aptos' %}
|
||||
CREATE schema IF NOT EXISTS _internal;
|
||||
{{ sp_create_prod_clone('_internal') }};
|
||||
{% endif %}
|
||||
{% endmacro %}
|
||||
{% endmacro %}
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
{% macro run_sp_create_prod_clone() %}
|
||||
{% set clone_query %}
|
||||
call xyz._internal.create_prod_clone('xyz', 'xyz_dev', 'internal_dev');
|
||||
{% set clone_query %}
|
||||
call aptos._internal.create_prod_clone(
|
||||
'aptos',
|
||||
'aptos_dev',
|
||||
'internal_dev'
|
||||
);
|
||||
{% endset %}
|
||||
|
||||
{% do run_query(clone_query) %}
|
||||
{% endmacro %}
|
||||
{% do run_query(clone_query) %}
|
||||
{% endmacro %}
|
||||
|
||||
@ -1,10 +1,6 @@
|
||||
{% macro add_database_or_schema_tags() %}
|
||||
{{ set_database_tag_value(
|
||||
'BLOCKCHAIN_NAME',
|
||||
'xyz'
|
||||
) }}
|
||||
{{ set_database_tag_value(
|
||||
'BLOCKCHAIN_TYPE',
|
||||
'IBC'
|
||||
'aptos'
|
||||
) }}
|
||||
{% endmacro %}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
{% docs __overview__ %}
|
||||
|
||||
# Welcome to the Flipside Crypto xyz Models Documentation
|
||||
# Welcome to the Flipside Crypto aptos Models Documentation
|
||||
|
||||
## **What does this documentation cover?**
|
||||
The documentation included here details the design of the xyz
|
||||
The documentation included here details the design of the aptos
|
||||
tables and views available via [Flipside Crypto.](https://flipsidecrypto.xyz/) For more information on how these models are built, please see [the github repository.](https://github.com/flipsideCrypto/xyz-models/)
|
||||
|
||||
## **How do I use these docs?**
|
||||
@ -17,7 +17,7 @@ There is more information on how to use dbt docs in the last section of this doc
|
||||
|
||||
**Click on the links below to jump to the documentation for each schema.**
|
||||
|
||||
### Core Tables (`xyz`.`CORE`.`<table_name>`)
|
||||
### Core Tables (`aptos`.`CORE`.`<table_name>`)
|
||||
|
||||
**Dimension Tables:**
|
||||
|
||||
@ -33,7 +33,7 @@ There is more information on how to use dbt docs in the last section of this doc
|
||||
|
||||
## **Data Model Overview**
|
||||
|
||||
The xyz
|
||||
The aptos
|
||||
models are built a few different ways, but the core fact tables are built using three layers of sql models: **bronze, silver, and gold (or core).**
|
||||
|
||||
- Bronze: Data is loaded in from the source as a view
|
||||
@ -68,7 +68,7 @@ Note that you can also right-click on models to interactively filter and explore
|
||||
- [Flipside](https://flipsidecrypto.xyz/)
|
||||
- [Velocity](https://app.flipsidecrypto.com/velocity?nav=Discover)
|
||||
- [Tutorials](https://docs.flipsidecrypto.com/our-data/tutorials)
|
||||
- [Github](https://github.com/FlipsideCrypto/xyz-models)
|
||||
- [Github](https://github.com/FlipsideCrypto/aptos-models)
|
||||
- [What is dbt?](https://docs.getdbt.com/docs/introduction)
|
||||
|
||||
{% enddocs %}
|
||||
@ -2,7 +2,7 @@ version: 2
|
||||
|
||||
sources:
|
||||
- name: crosschain
|
||||
database: "{{ 'crosschain' if target.database == 'xyz' else 'crosschain_dev' }}"
|
||||
database: "{{ 'crosschain' if target.database == 'aptos' else 'crosschain_dev' }}"
|
||||
schema: core
|
||||
tables:
|
||||
- name: dim_date_hours
|
||||
|
||||
@ -1,5 +1,9 @@
|
||||
packages:
|
||||
- package: calogica/dbt_expectations
|
||||
version: [">=0.4.0", "<0.9.0"]
|
||||
- package: dbt-labs/dbt_utils
|
||||
version: 1.0.0
|
||||
- git: https://github.com/FlipsideCrypto/fsc-utils.git
|
||||
revision: v1.3.0
|
||||
revision: "v1.8.0"
|
||||
- package: get-select/dbt_snowflake_query_tags
|
||||
version: [">=2.0.0", "<3.0.0"]
|
||||
@ -1,4 +1,4 @@
|
||||
xyz:
|
||||
aptos:
|
||||
target: dev
|
||||
outputs:
|
||||
dev:
|
||||
|
||||
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@ -0,0 +1 @@
|
||||
dbt-snowflake>=1.4,<1.5
|
||||
Loading…
Reference in New Issue
Block a user