Start Here: Documentation Templates: Model Template: Old - FlipsideCrypto/fsc-evm GitHub Wiki

{{MODEL_CATEGORY}} Models

{{MODEL_CATEGORY}} models in our dbt project serve as the {{MODEL_LAYER_DESCRIPTION}}. These models are designed to be flexible and configurable, allowing for easy adaptation to different data sources and chain specifications.

Available Models

Currently, we have the following types of models for each source: {{MODEL_TYPES_DESCRIPTION}}

Each model can be customized using various variables and macros.

Configurable Variables

Relevant Global Variables

Variable Default Description
{{GLOBAL_VARIABLES_TABLE}}

Model-Specific Variables

Each model can be customized using the following variables:

Variable Default Description
{{MODEL_SPECIFIC_VARIABLES_TABLE}}

Replace <MODEL_NAME> with the specific model name (e.g., {{MODEL_NAME_EXAMPLES}}).

Configuring DBT Project Variables

To override the default variables for a {{MODEL_CATEGORY}} model, you can set variables in your dbt_project.yml file. For example:

vars:
  {{VARIABLE_OVERRIDE_EXAMPLES}}

This allows you to adapt the {{MODEL_CATEGORY}} models to different data sources and chain specifications without modifying the core model code.

Invoking a Model

To run a {{MODEL_CATEGORY}} model in another repo, you can do so with something like:

For a single model:

dbt run -m {{SINGLE_MODEL_RUN_EXAMPLE}}

For all {{MODEL_CATEGORY}} models:

dbt run -m {{ALL_MODELS_RUN_EXAMPLE}}

For a tag:

dbt run -m {{TAG_RUN_EXAMPLE}}

Macros Used

The {{MODEL_CATEGORY}} models use several macros to set default variables and log details:

{{MACROS_DESCRIPTION}}

Example: {{EXAMPLE_MODEL_NAME}}

Here's a breakdown of the {{EXAMPLE_MODEL_NAME}} model:

{{EXAMPLE_MODEL_BREAKDOWN}}

Best Practices

  1. Always use the provided macros for setting default variables and logging details.
  2. When adding new {{MODEL_CATEGORY}} models, follow the existing naming conventions and structure.
  3. Document any new variables or customizations in this wiki page.
  4. Test thoroughly when changing partition functions or join keys.
⚠️ **GitHub.com Fallback** ⚠️