diff --git a/README.md b/README.md index 1528017..d1e0d38 100644 --- a/README.md +++ b/README.md @@ -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: password: region: - database: xyz_DEV + database: aptos_DEV 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')); ``` \ No newline at end of file diff --git a/macros/create_sps.sql b/macros/create_sps.sql index 8577716..2dff35f 100644 --- a/macros/create_sps.sql +++ b/macros/create_sps.sql @@ -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 %} \ No newline at end of file +{% endmacro %} diff --git a/macros/run_sp_create_prod_clone.sql b/macros/run_sp_create_prod_clone.sql index 1868683..84a758b 100644 --- a/macros/run_sp_create_prod_clone.sql +++ b/macros/run_sp_create_prod_clone.sql @@ -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 %} \ No newline at end of file + {% do run_query(clone_query) %} +{% endmacro %} diff --git a/macros/tags/add_database_or_schema_tags.sql b/macros/tags/add_database_or_schema_tags.sql index 184e0bd..2bcdb1e 100644 --- a/macros/tags/add_database_or_schema_tags.sql +++ b/macros/tags/add_database_or_schema_tags.sql @@ -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 %} diff --git a/models/descriptions/__overview__.md b/models/descriptions/__overview__.md index 588ffbd..e4cda7e 100644 --- a/models/descriptions/__overview__.md +++ b/models/descriptions/__overview__.md @@ -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`.``) +### Core Tables (`aptos`.`CORE`.``) **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 %} \ No newline at end of file diff --git a/models/sources.yml b/models/sources.yml index e31d5cc..f20c5d5 100644 --- a/models/sources.yml +++ b/models/sources.yml @@ -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 diff --git a/packages.yml b/packages.yml index e957078..5b4d5dd 100644 --- a/packages.yml +++ b/packages.yml @@ -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 \ No newline at end of file + revision: "v1.8.0" + - package: get-select/dbt_snowflake_query_tags + version: [">=2.0.0", "<3.0.0"] \ No newline at end of file diff --git a/profiles.yml b/profiles.yml index 0661f98..9cfab3f 100644 --- a/profiles.yml +++ b/profiles.yml @@ -1,4 +1,4 @@ -xyz: +aptos: target: dev outputs: dev: diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..ec44b06 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +dbt-snowflake>=1.4,<1.5 \ No newline at end of file