Go to file
Mike Stepanovic a71ecf55dc
Merge pull request #32 from FlipsideCrypto/fix-dim-programs
updated unique key in dim_programs
2025-07-25 10:18:05 -06:00
.github/workflows switching alerts from monthly to recent 2024-11-18 12:43:04 -07:00
analyses repo setup 2024-10-07 11:33:57 -06:00
data kept mins the same 2024-12-09 11:47:49 -07:00
docs repo setup 2024-10-07 11:33:57 -06:00
macros switched to FSC udfs and deleted custom udf 2024-12-03 11:30:19 -07:00
models updated unique key to include edition 2025-07-25 10:09:51 -06:00
python declutter alerts 2025-04-03 11:17:56 -06:00
snapshots repo setup 2024-10-07 11:33:57 -06:00
.gitignore streamline models and misc 2024-10-08 15:12:59 -04:00
dbt_project.yml moved tests to top level /gold dir; switched to FSC utils macros instead of custom; added liquidity pool actions pipelines and recency tests; edited registrations and swaps 2024-12-03 21:58:32 -07:00
LICENSE repo setup 2024-10-07 11:33:57 -06:00
package-lock.yml query tags 2024-11-20 13:06:57 -05:00
packages.yml query tags 2024-11-20 13:06:57 -05:00
profiles.yml streamline models and misc 2024-10-08 15:12:59 -04:00
README.md repo setup 2024-10-07 11:33:57 -06:00
requirements.txt repo setup 2024-10-07 11:33:57 -06:00
selectors.yml updated workflows and added integration testing at AE's request 2024-10-15 15:05:10 -06:00

Profile Set Up

Use the following within profiles.yml


aleo:
  target: dev
  outputs:
    dev:
      type: snowflake
      account: <ACCOUNT>
      role: <ROLE>
      user: <USERNAME>
      password: <PASSWORD>
      region: <REGION>
      database: ALEO_DEV
      warehouse: <WAREHOUSE>
      schema: silver
      threads: 4
      client_session_keep_alive: False
      query_tag: <TAG>

Resources:

  • Learn more about dbt in the docs

  • Check out Discourse for commonly asked questions and answers

  • Join the chat on Slack for live discussions and support

  • Find dbt events near you

  • Check out the blog for the latest news on dbt's development and best practices

  • Check out the blog for the latest news on dbt's development and best practices

Applying Model Tags

Database / Schema level tags

Database and schema tags are applied via the add_database_or_schema_tags macro. These tags are inherited by their downstream objects. To add/modify tags call the appropriate tag set function within the macro.

{{ set_database_tag_value('SOME_DATABASE_TAG_KEY','SOME_DATABASE_TAG_VALUE') }}
{{ set_schema_tag_value('SOME_SCHEMA_TAG_KEY','SOME_SCHEMA_TAG_VALUE') }}

Model tags

To add/update a model's snowflake tags, add/modify the meta model property under config. Only table level tags are supported at this time via DBT.

{{ config(
    ...,
    meta={
        'database_tags':{
            'table': {
                'PURPOSE': 'SOME_PURPOSE'
            }
        }
    },
    ...
) }}

By default, model tags are not pushed to snowflake on each load. You can push a tag update for a model by specifying the UPDATE_SNOWFLAKE_TAGS project variable during a run.

dbt run --var '{"UPDATE_SNOWFLAKE_TAGS":True}' -s models/core/core__fact_swaps.sql

Querying for existing tags on a model in snowflake

select *
from table(aleo.information_schema.tag_references('aleo.core.fact_blocks', 'table'));