feat(schemas): bring schemas/clickhouse/ to parity #58
Merged
wasabi opened 5 days ago

Summary

Adds documentation and fixes a test bug for the ClickHouse analytical event store.

Changes

Documentation

  • schemas/clickhouse/README.md — documents schema philosophy (analytical mirror, PostgreSQL is canonical), table overview (8 tables with TTLs), materialized view catalog (12 views), regular views (4), application method (scripts/seed.sh, idempotent IF NOT EXISTS), ingestion writers (13 Python modules), and security (identifier validation).

Bug Fix

  • tests/test_e2e_platform.py — fixed test_all_views_exist which collected ClickHouse view names and validated them against PostgreSQL's information_schema.views, always reporting them as missing. Split into:
    • PostgreSQL views: checked via _check_view (PostgreSQL information_schema.views)
    • ClickHouse views: checked via _check_ch_view (ClickHouse system.tables)
    • Added _run_ch() helper for ClickHouse Docker exec queries

Verification

  • No schema changes — all 8 tables, 12 materialized views, 4 regular views are correct and aligned with Python ingestion writers
  • _check_ch_view correctly queries ClickHouse system.tables for view existence
  • _run_ch reads CLICKHOUSE_PASSWORD from env with dev fallback
  • No whitespace errors
Commits were merged into target branch
  • feat(schemas): bring schemas/clickhouse/ to parity with codebase
    - Add README.md documenting schema philosophy, table overview, materialized views,
      application method, and ingestion writers.
    - Fix test_e2e_platform.py: separate ClickHouse view validation from PostgreSQL —
      ClickHouse views were being checked against PostgreSQL information_schema.views,
      which always reported them as missing. Added _run_ch() and _check_ch_view() helpers
      that validate via ClickHouse system.tables.
    5 days ago
    fix(tests): separate ClickHouse view validation from PostgreSQL
    test_e2e_platform.py was collecting ClickHouse view names and checking
    them against PostgreSQL information_schema.views — which always reported
    them as missing. Split into two independent checks:
    
    - PostgreSQL views validated via _check_view (information_schema.views)
    - ClickHouse views validated via _check_ch_view (system.tables)
    5 days ago
  • wasabi merged 5 days ago
1/1
Submitter wasabi
Target main
Source feat/clickhouse-parity
Jobs
Merge Strategy
Create Merge Commit
Watchers (1)
Reference
pull request KI-58
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover