Skip to content

rdt-model-store

rdt-model-store generates and deploys all Snowflake storage artifacts across the medallion architecture:

  • Bronze — Physical append-only table with G1 completeness checks
  • Silver — Curated view with G2 validity filters, enriched from RTiS terminologies + Collibra governance
  • Gold — Data product view with G3 + G4 business rules, enriched from all sources
  • Semantic — Semantic view definition for Cortex Analyst and AI-queryable metrics

All DDL and dbt models are generated from Tera templates embedded at compile time.

Pipeline phase: Phase 4 — Deploy

Usage:

Terminal window
cargo run -p rdt-model-store -- --target dev generate --entity waste-tracking --dry-run
cargo run -p rdt-model-store -- --target dev deploy --entity waste-tracking

Configuration:

KeySourceDescription
snowflake.accountroche-data.tomlSnowflake account identifier
SNOWFLAKE_USEREnvironment variableSnowflake username
SNOWFLAKE_PRIVATE_KEYEnvironment variableKey-pair authentication

Dependencies:

  • rdt-model-pull (model.json)
  • rdt-model-govern (governance.json, gupri.yaml)

Output:

FileFormatDescription
snowflake/ddl/{entity}.sqlSQLBronze DDL + G1 DQ rules
dbt/models/bronze/{entity}.sql + .ymlSQL/YAMLdbt Bronze model + schema
dbt/models/silver/{entity}_silver.sql + .ymlSQL/YAMLdbt Silver view + G2 tests
dbt/models/gold/{entity}_gold.sql + .ymlSQL/YAMLdbt Gold view + G3 tests
dbt/models/semantic/{entity}.semantic.ymlYAMLSemantic view for Cortex Analyst

Access gate: Blocked until access tasks A05 + A06 (Snowflake) resolve. Generates artifacts locally in --dry-run mode until then.

DQ integration: G2 and G3 quality predicates in Silver/Gold views are compiled separately by rdt-model-policy from the shared CEL rule library. See Quality Assurance Approach for the full four-gate architecture.