An enterprise-grade, high-velocity cognitive analytics data platform designed to ingest network usage metrics, guarantee zero-data-loss, quarantine anomalies via a Dead Letter Queue (DLQ), and deliver an auditable, multi-layered Medallion warehouse using ClickHouse and dbt.
The primary objective of TCDP is to bridge the gap between volatile, high-frequency network telemetric streams and actionable cognitive business intelligence.
- 100% Data Parity: End-to-end alignment between raw source metrics and analytical dimensions.
- Zero-Data-Loss Architecture: Enforced via a strict, automated data reconciliation gate built directly into the continuous integration cycle.
- Fault-Tolerant Ingestion: Automated schema validation and isolation of malformed telemetric records into a secure Dead Letter Queue (DLQ).
The platform implements a modern decoupling of storage and compute, leveraging ClickHouse for localized columnar processing and dbt for maintaining transformation states.
- Landing & Ingest Layer: Stateless Python ingestion engine (
network_usage_ingester.py) driven by dynamic configuration matrices. It reads raw feeds and streams them into a structured Bronze Parquet format. - Medallion Warehouse (ClickHouse):
- Staging Layer: Materializes schema abstractions, flattens Parquet payloads, and generates deterministic Primary Keys (
usage_pk) along with salted, cryptographically secure customer key hashes (customer_key_hash). - Silver Layer: Eradicates late-arrival volatility by applying a sliding 3-day watermark window.
- Core Analytical Layer: A structured Star-Schema layout exposing optimized dimensional entities (
dim_customer,dim_time,dim_network_type) and canonical fact components.
- Staging Layer: Materializes schema abstractions, flattens Parquet payloads, and generates deterministic Primary Keys (
[Raw Feed] ──► [Ingestion Engine] ──┬──► (Valid Records) ──► [Bronze Parquet] ──► [Staging Views] ──► [Silver Facts] ──► [Core Dims]
└──► (Malformed) ──► [DLQ (JSON)]
- Ingest: Raw telemetry is validated, normalized, and written to Bronze as Parquet; bad rows are quarantined to DLQ.
- Staging: Bronze records are transformed into deterministic staging views that preserve provenance and allow strict parity auditing.
- Silver: Canonical facts are generated with temporal resilience, using a configurable 3-day late-arrival watermark.
- Core: Star-schema dimensions and fact views are exposed for analytics, reporting, and downstream consumption.
- Pre-commit hooks validate formatting and static checks before code is committed.
sql_validator.pyperforms Jinja-aware validation of SQL assets and enforces safe join patterns.- GitHub Actions run service containers using ClickHouse and mount the Bronze dataset into the test environment.
- Reconciliation gate uses a
no_rowsdbt test to block deployments when staging and silver parity criteria are not met.
This repository is designed to serve as both a working data platform and an engineering blueprint for production teams. Key design assets include:
specs/platform_spec.mdspecs/implementation_design.mdai_factory/shared_memory/project_status.mdai_factory/tools/sql_validator.py
- Build and runtime artifacts are intentionally excluded via
.gitignore. - Source code and documentation are maintained at the repository root and in structured subdirectories.
- A dedicated
tests/folder houses integration and validation test cases. - The platform is engineered for repeatable deployment, auditability, and enterprise readiness.
- Automated synchronization is enabled via
.github/workflows/github_project_sync.yml. - The workflow reads
ai_factory/shared_memory/sprint_backlog.jsonandai_factory/shared_memory/project_status.mdon every push tomain. - Configure
PROJECT_RECON_TOKENin repository secrets with a fine-grained PAT that has repository and project board read/write access. - The workflow will also fall back to
GITHUB_TOKENifPROJECT_RECON_TOKENis not available, provided the repository permissions allow Projects write access. - This ensures features, user stories, and task statuses remain aligned between the repo and GitHub Projects.