How myhub2013/sql-data-warehouse-project works
Purpose and Entry Points
This repository defines a SQL Server data warehouse built through layered ETL and analytical data modeling. The execution entry point is scripts/init_database.sql, followed by schema deployment and load procedures for each warehouse layer.
Database Initialization
scripts/init_database.sql establishes the database-level foundation required before warehouse objects are deployed. It is the top-level operational boundary for provisioning the SQL Server warehouse environment.
Bronze: Source Landing Layer
The Bronze layer stores ingested source data with minimal transformation. Its schema and loading logic are separated into:
• scripts/bronze/ddl_bronze.sql
• scripts/bronze/proc_load_bronze.sql
The Bronze load procedure is the first ETL stage and consumes raw datasets expected under datasets/.
Silver: Cleansed and Standardized Layer
The Silver layer transforms Bronze records into cleaned, conformed warehouse data:
• scripts/silver/ddl_silver.sql
• scripts/silver/proc_load_silver.sql
This is the primary data-quality and normalization boundary: downstream models should depend on Silver rather than raw Bronze structures.
Gold: Analytics Serving Layer
The Gold layer exposes analytics-oriented structures, likely dimensional models, summaries, or reporting-ready tables:
• scripts/gold/ddl_gold.sql
Gold is populated from the curated Silver layer and is the intended interface for analytics consumers.
Data Flow and Boundaries
The core control flow is sequential: database initialization → Bronze DDL/load → Silver DDL/load → Gold DDL. Source files enter through datasets/, are landed in Bronze, standardized in Silver, and published through Gold. SQL Server is the material runtime; stored procedures provide the ETL execution boundary.
Validation and Data Governance
Quality checks validate transformed and served data rather than raw ingestion:
• tests/quality_checks_silver.sql
• tests/quality_checks_gold.sql
The available dataset documentation is docs/data_catalog .md, which should define source or warehouse data semantics used by the ETL pipeline.
Main entry points: data_catalog .md Data catalog · ddl_bronze.sql Bronze schema · ddl_silver.sql Silver schema · ddl_gold.sql Gold schema
Components 14
Provisioning
- Database initialization · Provisions the SQL Server warehouse foundation.
scripts/init_database.sql - SQL Server warehouse
Bronze
Raw source landing layer.
- Bronze schema
scripts/bronze/ddl_bronze.sql - Bronze load procedure
scripts/bronze/proc_load_bronze.sql - Bronze tables
Silver
Cleansed and conformed layer.
- Silver schema
scripts/silver/ddl_silver.sql - Silver load procedure · Applies data quality and normalization.
scripts/silver/proc_load_silver.sql - Silver tables
Gold
Analytics serving layer.
- Gold schema · Defines reporting-ready analytics structures.
scripts/gold/ddl_gold.sql - Gold tables
Governance
- Data catalog · Documents source and warehouse data semantics.
docs/data_catalog .md - Silver quality checks
tests/quality_checks_silver.sql - Gold quality checks
tests/quality_checks_gold.sql
Other components
- Raw datasets · Input datasets consumed by the Bronze load.
Connections 17
- Database initialization → SQL Server warehouse: provisions
- SQL Server warehouse → Bronze schema: deploys
- Bronze schema → Bronze tables: creates
- Raw datasets → Bronze load procedure: ingests
- Bronze load procedure → Bronze tables: lands
- Bronze tables → Silver load procedure: transforms
- Silver schema → Silver tables: creates
- Silver load procedure → Silver tables: cleanses and conforms
- Bronze schema → Silver schema: deployment order
- Silver tables → Gold schema: publishes from
- Gold schema → Gold tables: creates
- Silver schema → Gold schema: deployment order
- Silver quality checks → Silver tables: validates
- Gold quality checks → Gold tables: validates
- Data catalog → Bronze tables: documents
- Data catalog → Silver tables: documents
- Data catalog → Gold tables: documents