Files
ddadmin 00c97eb063 test(generator): усилены проверки startup-history и Superset
- Зачем:
  - зелёный результат проверок должен означать фактический стык и точный контракт дашборда.
- Что:
  - проверка startup-history читает manifest, требует live seam и непустой ODS.
  - добавлен быстрый runtime gate для daily-wave и live-продолжения.
  - Superset sync ограничен целевым dashboard и сверяет существенные params.
- Проверка:
  - docker target tests; make generator-test; make generated-history-runtime-check.
2026-07-05 21:32:51 +03:00

325 lines
18 KiB
JSON

{
"dashboards": [
{
"__Dashboard__": {
"dashboard_title": "🛒 E-commerce Analytics Dashboard",
"description": "Аналитический дашборд для e-commerce кликстрима: трафик, конверсии, география и прохождение строк по слоям.",
"slug": "ecommerce-analytics",
"published": true,
"json_metadata": "{\"native_filter_configuration\": [{\"id\": \"date_filter\", \"name\": \"📅 Date Range\", \"filterType\": \"filter_time\", \"targets\": [{\"datasetId\": null, \"column\": {\"name\": \"event_date\"}}], \"defaultValue\": \"Last week\", \"scope\": {\"root\": [\"ROOT_ID\"], \"excluded\": []}, \"cascadeParentIds\": [], \"isInstant\": true}, {\"id\": \"country_filter\", \"name\": \"🌍 Country\", \"filterType\": \"filter_select\", \"targets\": [{\"datasetId\": null, \"column\": {\"name\": \"geo_country\"}}], \"scope\": {\"root\": [\"ROOT_ID\"], \"excluded\": []}, \"isInstant\": true, \"allowsMultipleValues\": true, \"isRequired\": false}, {\"id\": \"device_filter\", \"name\": \"📱 Device Type\", \"filterType\": \"filter_select\", \"targets\": [{\"datasetId\": null, \"column\": {\"name\": \"device_type\"}}], \"scope\": {\"root\": [\"ROOT_ID\"], \"excluded\": []}, \"isInstant\": true, \"allowsMultipleValues\": true, \"isRequired\": false}, {\"id\": \"browser_filter\", \"name\": \"🌐 Browser\", \"filterType\": \"filter_select\", \"targets\": [{\"datasetId\": null, \"column\": {\"name\": \"browser_name\"}}], \"scope\": {\"root\": [\"ROOT_ID\"], \"excluded\": []}, \"isInstant\": true, \"allowsMultipleValues\": true, \"isRequired\": false}], \"color_scheme\": \"supersetColors\", \"label_colors\": {}}",
"position_json": "{\"DASHBOARD_VERSION_KEY\": \"v2\", \"ROOT_ID\": {\"id\": \"ROOT_ID\", \"type\": \"ROOT\", \"children\": [\"GRID_ID\"]}, \"GRID_ID\": {\"id\": \"GRID_ID\", \"type\": \"GRID\", \"children\": [\"ROW-0\", \"ROW-1\", \"ROW-2\", \"ROW-3\"], \"parents\": [\"ROOT_ID\"], \"meta\": {\"background\": \"BACKGROUND_TRANSPARENT\"}}, \"CHART-1\": {\"id\": \"CHART-1\", \"type\": \"CHART\", \"children\": [], \"parents\": [\"ROOT_ID\", \"GRID_ID\", \"ROW-0\"], \"meta\": {\"chartId\": 1, \"sliceName\": \"📊 Total Events\", \"width\": 3, \"height\": 30}}, \"CHART-2\": {\"id\": \"CHART-2\", \"type\": \"CHART\", \"children\": [], \"parents\": [\"ROOT_ID\", \"GRID_ID\", \"ROW-0\"], \"meta\": {\"chartId\": 2, \"sliceName\": \"👤 Unique Users\", \"width\": 3, \"height\": 30}}, \"CHART-3\": {\"id\": \"CHART-3\", \"type\": \"CHART\", \"children\": [], \"parents\": [\"ROOT_ID\", \"GRID_ID\", \"ROW-0\"], \"meta\": {\"chartId\": 3, \"sliceName\": \"📈 Avg Events/Visit\", \"width\": 3, \"height\": 30}}, \"CHART-4\": {\"id\": \"CHART-4\", \"type\": \"CHART\", \"children\": [], \"parents\": [\"ROOT_ID\", \"GRID_ID\", \"ROW-0\"], \"meta\": {\"chartId\": 4, \"sliceName\": \"🎯 Conversion to /confirmation\", \"width\": 3, \"height\": 30}}, \"ROW-0\": {\"id\": \"ROW-0\", \"type\": \"ROW\", \"children\": [\"CHART-1\", \"CHART-2\", \"CHART-3\", \"CHART-4\"], \"parents\": [\"ROOT_ID\", \"GRID_ID\"], \"meta\": {\"background\": \"BACKGROUND_TRANSPARENT\"}}, \"CHART-5\": {\"id\": \"CHART-5\", \"type\": \"CHART\", \"children\": [], \"parents\": [\"ROOT_ID\", \"GRID_ID\", \"ROW-1\"], \"meta\": {\"chartId\": 5, \"sliceName\": \"📅 Events over Time\", \"width\": 8, \"height\": 60}}, \"CHART-6\": {\"id\": \"CHART-6\", \"type\": \"CHART\", \"children\": [], \"parents\": [\"ROOT_ID\", \"GRID_ID\", \"ROW-1\"], \"meta\": {\"chartId\": 6, \"sliceName\": \"📱 Traffic by Device\", \"width\": 4, \"height\": 60}}, \"ROW-1\": {\"id\": \"ROW-1\", \"type\": \"ROW\", \"children\": [\"CHART-5\", \"CHART-6\"], \"parents\": [\"ROOT_ID\", \"GRID_ID\"], \"meta\": {\"background\": \"BACKGROUND_TRANSPARENT\"}}, \"CHART-7\": {\"id\": \"CHART-7\", \"type\": \"CHART\", \"children\": [], \"parents\": [\"ROOT_ID\", \"GRID_ID\", \"ROW-2\"], \"meta\": {\"chartId\": 7, \"sliceName\": \"🌍 Top Countries by Events\", \"width\": 6, \"height\": 60}}, \"CHART-8\": {\"id\": \"CHART-8\", \"type\": \"CHART\", \"children\": [], \"parents\": [\"ROOT_ID\", \"GRID_ID\", \"ROW-2\"], \"meta\": {\"chartId\": 8, \"sliceName\": \"🔗 UTM Effectiveness Table\", \"width\": 6, \"height\": 60}}, \"ROW-2\": {\"id\": \"ROW-2\", \"type\": \"ROW\", \"children\": [\"CHART-7\", \"CHART-8\"], \"parents\": [\"ROOT_ID\", \"GRID_ID\"], \"meta\": {\"background\": \"BACKGROUND_TRANSPARENT\"}}, \"CHART-9\": {\"id\": \"CHART-9\", \"type\": \"CHART\", \"children\": [], \"parents\": [\"ROOT_ID\", \"GRID_ID\", \"ROW-3\"], \"meta\": {\"chartId\": 9, \"sliceName\": \"🪜 Page Funnel\", \"width\": 6, \"height\": 60}}, \"CHART-10\": {\"id\": \"CHART-10\", \"type\": \"CHART\", \"children\": [], \"parents\": [\"ROOT_ID\", \"GRID_ID\", \"ROW-3\"], \"meta\": {\"chartId\": 10, \"sliceName\": \"🧱 Rows by Layer (event)\", \"width\": 6, \"height\": 60}}, \"ROW-3\": {\"id\": \"ROW-3\", \"type\": \"ROW\", \"children\": [\"CHART-9\", \"CHART-10\"], \"parents\": [\"ROOT_ID\", \"GRID_ID\"], \"meta\": {\"background\": \"BACKGROUND_TRANSPARENT\"}}}",
"slices": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10
]
}
}
],
"charts": [
{
"__Slice__": {
"slice_name": "📊 Total Events",
"viz_type": "big_number_total",
"datasource_type": "table",
"datasource_name": "dm.v_events_enriched",
"params": "{\"metric\": {\"expressionType\": \"SQL\", \"sqlExpression\": \"COUNT(*)\", \"column\": null, \"aggregate\": null, \"label\": \"Total Events\", \"optionName\": \"metric_1\"}, \"y_axis_format\": \",d\", \"time_range\": \"No filter\", \"datasource\": \"1__table\", \"viz_type\": \"big_number_total\"}",
"description": "Chart created automatically for v_events_enriched"
}
},
{
"__Slice__": {
"slice_name": "👤 Unique Users",
"viz_type": "big_number_total",
"datasource_type": "table",
"datasource_name": "dm.v_events_enriched",
"params": "{\"metric\": {\"expressionType\": \"SQL\", \"sqlExpression\": \"COUNT(DISTINCT user_domain_id)\", \"label\": \"Unique Users\", \"optionName\": \"metric_2\"}, \"y_axis_format\": \",d\", \"time_range\": \"No filter\", \"datasource\": \"1__table\", \"viz_type\": \"big_number_total\"}",
"description": "Chart created automatically for v_events_enriched"
}
},
{
"__Slice__": {
"slice_name": "📈 Avg Events/Visit",
"viz_type": "big_number_total",
"datasource_type": "table",
"datasource_name": "dm.v_events_enriched",
"params": "{\"metric\": {\"expressionType\": \"SQL\", \"sqlExpression\": \"COUNT(*) / COUNT(DISTINCT click_id)\", \"label\": \"Avg Events/Visit\", \"optionName\": \"metric_4\"}, \"y_axis_format\": \".1f\", \"time_range\": \"No filter\", \"datasource\": \"1__table\", \"viz_type\": \"big_number_total\"}",
"description": "Chart created automatically for v_events_enriched"
}
},
{
"__Slice__": {
"slice_name": "🎯 Conversion to /confirmation",
"viz_type": "big_number_total",
"datasource_type": "table",
"datasource_name": "dm.v_events_enriched",
"params": "{\"metric\": {\"expressionType\": \"SQL\", \"sqlExpression\": \"if(countIf(page_url_path = '/home') = 0, 0, countIf(page_url_path = '/confirmation') / countIf(page_url_path = '/home'))\", \"label\": \"Conversion to /confirmation\", \"optionName\": \"metric_5\"}, \"y_axis_format\": \".1%\", \"time_range\": \"No filter\", \"datasource\": \"1__table\", \"viz_type\": \"big_number_total\"}",
"description": "Chart created automatically for v_events_enriched"
}
},
{
"__Slice__": {
"slice_name": "📅 Events over Time",
"viz_type": "echarts_timeseries_line",
"datasource_type": "table",
"datasource_name": "dm.v_events_enriched",
"params": "{\"granularity_sqla\": \"event_ts\", \"time_grain_sqla\": \"PT5M\", \"metrics\": [{\"expressionType\": \"SQL\", \"sqlExpression\": \"COUNT(*)\", \"label\": \"Events\"}], \"groupby\": [], \"time_range\": \"No filter\", \"adhoc_filters\": [], \"row_limit\": 10000, \"datasource\": \"1__table\", \"viz_type\": \"echarts_timeseries_line\"}",
"description": "Chart created automatically for v_events_enriched"
}
},
{
"__Slice__": {
"slice_name": "📱 Traffic by Device",
"viz_type": "pie",
"datasource_type": "table",
"datasource_name": "dm.v_events_enriched",
"params": "{\"groupby\": [\"device_type\"], \"metric\": {\"expressionType\": \"SQL\", \"sqlExpression\": \"COUNT(*)\", \"label\": \"Count\"}, \"row_limit\": 100, \"donut\": true, \"show_legend\": true, \"labels_outside\": true, \"time_range\": \"No filter\", \"datasource\": \"1__table\", \"viz_type\": \"pie\"}",
"description": "Chart created automatically for v_events_enriched"
}
},
{
"__Slice__": {
"slice_name": "🌍 Top Countries by Events",
"viz_type": "echarts_timeseries_bar",
"datasource_type": "table",
"datasource_name": "dm.v_events_enriched",
"params": "{\"x_axis\": \"geo_country\", \"metrics\": [{\"expressionType\": \"SQL\", \"sqlExpression\": \"COUNT(*)\", \"label\": \"Events, pcs\"}], \"row_limit\": 15, \"order_desc\": true, \"sort_series_type\": \"sum\", \"x_axis_sort\": \"Events, pcs\", \"x_axis_sort_asc\": false, \"orientation\": \"vertical\", \"color_scheme\": \"supersetColors\", \"show_legend\": true, \"legendOrientation\": \"top\", \"legendType\": \"scroll\", \"rich_tooltip\": true, \"tooltipTimeFormat\": \"smart_date\", \"x_axis_title\": \"Country\", \"x_axis_title_margin\": 15, \"truncateXAxis\": true, \"y_axis_title\": \"Events, pcs\", \"y_axis_title_margin\": 15, \"y_axis_title_position\": \"Left\", \"y_axis_format\": \",d\", \"time_range\": \"No filter\", \"datasource\": \"1__table\", \"viz_type\": \"echarts_timeseries_bar\"}",
"description": "Chart created automatically for v_events_enriched"
}
},
{
"__Slice__": {
"slice_name": "🔗 UTM Effectiveness Table",
"viz_type": "table",
"datasource_type": "table",
"datasource_name": "dm.v_utm_effectiveness",
"params": "{\"groupby\": [\"utm_source\", \"utm_medium\", \"utm_campaign\"], \"metrics\": [{\"expressionType\": \"SQL\", \"sqlExpression\": \"SUM(clicks)\", \"label\": \"Clicks\"}, {\"expressionType\": \"SQL\", \"sqlExpression\": \"SUM(uniq_users)\", \"label\": \"Users\"}, {\"expressionType\": \"SQL\", \"sqlExpression\": \"SUM(uniq_sessions)\", \"label\": \"Sessions\"}], \"row_limit\": 100, \"time_range\": \"No filter\", \"adhoc_filters\": [{\"clause\": \"WHERE\", \"expressionType\": \"SQL\", \"sqlExpression\": \"utm_source IS NOT NULL\", \"subject\": null, \"operator\": null, \"comparator\": null}], \"datasource\": \"2__table\", \"viz_type\": \"table\"}",
"description": "Chart created automatically for v_utm_effectiveness"
}
},
{
"__Slice__": {
"slice_name": "🪜 Page Funnel",
"viz_type": "funnel",
"datasource_type": "table",
"datasource_name": "dm.v_top_pages_daily",
"params": "{\"groupby\": [\"page_url_path\"], \"metric\": {\"expressionType\": \"SQL\", \"sqlExpression\": \"SUM(pageviews)\", \"label\": \"Pageviews\"}, \"row_limit\": 20, \"time_range\": \"No filter\", \"sort_by_metric\": true, \"percent_calculation_type\": \"first_step\", \"color_scheme\": \"supersetColors\", \"show_legend\": true, \"legendOrientation\": \"top\", \"legendMargin\": 50, \"tooltip_label_type\": 5, \"number_format\": \"SMART_NUMBER\", \"show_labels\": true, \"show_tooltip_labels\": true, \"datasource\": \"3__table\", \"viz_type\": \"funnel\"}",
"description": "Chart created automatically for v_top_pages_daily"
}
},
{
"__Slice__": {
"slice_name": "🧱 Rows by Layer (event)",
"viz_type": "dist_bar",
"datasource_type": "table",
"datasource_name": "dm.dq_summary",
"params": "{\"groupby\": [{\"expressionType\": \"SQL\", \"sqlExpression\": \"multiIf(layer = 'stg', '1 · stg', layer = 'ods', '2 · ods', layer = 'dds', '3 · dds', '4 · dm')\", \"label\": \"Layer\"}], \"metrics\": [{\"expressionType\": \"SQL\", \"sqlExpression\": \"SUM(check_value)\", \"label\": \"Rows\"}], \"adhoc_filters\": [{\"clause\": \"WHERE\", \"expressionType\": \"SQL\", \"sqlExpression\": \"check_name = 'total_rows' AND table_name IN ('browser_raw', 'browser_event', 'event', 'v_events_enriched')\", \"subject\": null, \"operator\": null, \"comparator\": null}], \"order_bars\": true, \"row_limit\": 100, \"time_range\": \"No filter\", \"y_axis_format\": \",d\", \"show_legend\": false, \"datasource\": \"4__table\", \"viz_type\": \"dist_bar\"}",
"description": "Chart created automatically for dq_summary"
}
}
],
"datasets": [
{
"__SqlaTable__": {
"table_name": "v_events_enriched",
"schema": "dm",
"database": "clickhouse_dwh",
"description": "Полная обогащённая витрина событий (event + click)",
"columns": [
{
"column_name": "event_id",
"type": "UUID",
"description": "UUID события"
},
{
"column_name": "event_ts",
"type": "DateTime64(6)",
"description": "Время события"
},
{
"column_name": "event_date",
"type": "Date",
"description": "Дата события"
},
{
"column_name": "event_type",
"type": "String",
"description": "Тип события"
},
{
"column_name": "click_id",
"type": "UUID",
"description": "ID сессии"
},
{
"column_name": "user_domain_id",
"type": "UUID",
"description": "ID пользователя"
},
{
"column_name": "device_type",
"type": "String",
"description": "Тип устройства"
},
{
"column_name": "geo_country",
"type": "String",
"description": "Страна"
},
{
"column_name": "browser_name",
"type": "String",
"description": "Браузер"
},
{
"column_name": "utm_source",
"type": "String",
"description": "UTM Source"
},
{
"column_name": "utm_medium",
"type": "String",
"description": "UTM Medium"
},
{
"column_name": "page_url_path",
"type": "String",
"description": "Путь URL"
}
]
}
},
{
"__SqlaTable__": {
"table_name": "v_utm_effectiveness",
"schema": "dm",
"database": "clickhouse_dwh",
"description": "Эффективность UTM-кампаний",
"columns": [
{
"column_name": "event_date",
"type": "Date",
"description": "Дата"
},
{
"column_name": "utm_source",
"type": "String",
"description": "UTM Source"
},
{
"column_name": "utm_medium",
"type": "String",
"description": "UTM Medium"
},
{
"column_name": "utm_campaign",
"type": "String",
"description": "UTM Campaign"
},
{
"column_name": "clicks",
"type": "UInt64",
"description": "Клики"
},
{
"column_name": "uniq_users",
"type": "UInt64",
"description": "Уникальные пользователи"
},
{
"column_name": "uniq_sessions",
"type": "UInt64",
"description": "Уникальные сессии"
}
]
}
},
{
"__SqlaTable__": {
"table_name": "v_top_pages_daily",
"schema": "dm",
"database": "clickhouse_dwh",
"description": "Популярность страниц по дням",
"columns": [
{
"column_name": "event_date",
"type": "Date",
"description": "Дата"
},
{
"column_name": "page_url_path",
"type": "String",
"description": "Путь URL"
},
{
"column_name": "pageviews",
"type": "UInt64",
"description": "Просмотры"
},
{
"column_name": "uniq_clicks",
"type": "UInt64",
"description": "Уникальные клики"
}
]
}
},
{
"__SqlaTable__": {
"table_name": "dq_summary",
"schema": "dm",
"database": "clickhouse_dwh",
"description": "Сводка по качеству данных",
"columns": [
{
"column_name": "check_date",
"type": "Date",
"description": "Дата проверки"
},
{
"column_name": "layer",
"type": "String",
"description": "Слой (stg/ods/dds)"
},
{
"column_name": "table_name",
"type": "String",
"description": "Имя таблицы"
},
{
"column_name": "check_name",
"type": "String",
"description": "Тип проверки"
},
{
"column_name": "check_value",
"type": "UInt64",
"description": "Значение"
}
]
}
}
],
"databases": [
{
"__Database__": {
"database_name": "clickhouse_dwh",
"sqlalchemy_uri": "clickhousedb://default:123456@clickhouse:8123/default",
"expose_in_sqllab": true,
"allow_ctas": false,
"allow_cvas": false,
"allow_dml": false,
"allow_file_upload": false,
"extra": "{}"
}
}
]
}