{
"generatedAt": "2026-02-26T14:30:00.000Z",
"stats": {
"totalMongoFields": 156,
"totalChColumns": 164,
"totalEsFields": 20,
"totalCabinetDtoFields": 52,
"totalAdminDtoFields": 71,
"totalWidgetDtoFields": 0,
"scenarioCount": 14,
"mappedFields": 142,
"normalizedFields": 24,
"jsonBlobFields": 6,
"derivedFields": 2,
"technicalFields": 1,
"unmappedChColumns": 3,
"unmappedMongoFields": 5
},
"diagram": {
"nodes": [
{
"id": "ch_events",
"label": "CH events",
"type": "source",
"group": "write",
"fieldCount": 164,
"description": "MergeTree — append-only log (flat)"
}
],
"edges": [
{
"id": "mongo_to_kafka",
"source": "mongodb",
"target": "kafka",
"label": "nested → flat",
"description": "ClickHouseEventMapperService denormalizes nested objects",
"fieldCount": 202
}
]
},
"fields": [
{
"group": "costs",
"mongoPaths": [
"source_context.data_tg.chat_id",
"source_context.data_max.chat_id"
],
"parsedFields": [
"source_context.data_tg.chat_id",
"source_context.data_max.chat_id"
],
"chColumn": "costs_text_prompt_tokens",
"chType": "UInt32",
"esField": "content",
"cabinetDtoFields": [
"costs.text.prompt_tokens"
],
"adminDtoFields": [
"costs.text.prompt_tokens"
],
"widgetDtoFields": [
"message.content"
],
"transform": "identity",
"mappingKind": "direct",
"scenarioIds": [
"source_tg_topic",
"source_max_dialog"
],
"notes": [
"button_click_message_id_kind is an internal ClickHouse discriminator used to restore button_click.message_id as number|string without loss."
],
"mvSources": [
"event_summary_state_full_mv",
"event_summary_state_patch_mv"
]
}
],
"stageCoverage": [
{
"stage": "mongo_to_ch",
"mode": "coverage",
"description": "Canonical Mongo/event paths that are written into ClickHouse columns.",
"total": 250,
"covered": 243,
"uncovered": [
"string"
],
"excluded": [
"string"
]
}
],
"scenarioCoverage": [
{
"scenarioId": "source_tg_topic",
"description": "Telegram topic source with Telegram delivery branch",
"mongoFields": 210,
"mappedMongoFields": 205,
"mappedChColumns": 190,
"parsedFields": 175,
"cabinetFields": 150,
"adminFields": 180,
"widgetFields": 42
}
],
"mvPipeline": [
{
"name": "event_status_state_patch_mv",
"triggerTypes": [
"message_delivered",
"message_read"
],
"updatedFields": [
"status_is_delivered",
"status_is_read"
],
"preservedSource": "new_event",
"versionStrategy": "append-only, latest by inserted_at",
"description": "Writes delivery/read/delete patches into event_status_state"
}
],
"mvConsistency": {
"allConsistent": true,
"mvChecks": [
{
"name": "event_identity_state_mv",
"totalColumns": 204,
"missingColumns": [
"string"
],
"extraColumns": [
"string"
],
"isConsistent": true
}
]
},
"coverageNotes": [
"string"
],
"unmappedChColumns": [
"entity_key"
],
"unmappedMongoFields": [
"string"
]
}