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
- 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.
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)
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, idempotentIF NOT EXISTS), ingestion writers (13 Python modules), and security (identifier validation).Bug Fix
tests/test_e2e_platform.py— fixedtest_all_views_existwhich collected ClickHouse view names and validated them against PostgreSQL'sinformation_schema.views, always reporting them as missing. Split into:_check_view(PostgreSQLinformation_schema.views)_check_ch_view(ClickHousesystem.tables)_run_ch()helper for ClickHouse Docker exec queriesVerification
_check_ch_viewcorrectly queries ClickHousesystem.tablesfor view existence_run_chreadsCLICKHOUSE_PASSWORDfrom env with dev fallback