Step-by-step workflow for adding new dbt models to the Lotus analytics project. Covers source definitions, the silver/gold medallion architecture (staging stg_, core fct_/dim_, gold analytics), incremental materialization, tagging, primary key tests, and dbt-utils tests. Use this skill whenever the user wants to add a new dbt model, source, or test, or asks how the dbt layer structure works.
dbt project: services/dbt/ | Packages: services/dbt/packages.yml (includes dbt-utils)
Source (external tables in source schema)
-> Silver / Staging (stg_*) light transforms, rename columns
-> Silver / Core (fct_*, dim_*) business logic, joins, derived fields
-> Gold / Analytics (marts) aggregated, business-ready tables
Output schemas (silver or gold) are controlled by dbt_project.yml + macros/generate_schema_name.sql. Tagging (staging, core, analytics) and grouping are auto-applied by directory.
Location: models/sources/application_db/{table_name}.yml -- one file per table, all use and .
schema: sourcename: application_db