feat(superset): датасеты и дашборд «Бизнес-сюжеты» деревом импорта
- Зачем: - этап 8 (#196): три сюжета спеки — выручка, сверка, посетители / известные — должны приезжать в Superset при каждой инициализации стенда, без ручной сборки в интерфейсе. - Что: - дерево infra/superset/import/ дополнено датасетами трех витрин dm, тремя графиками и дашбордом «Бизнес-сюжеты»; uuid розданы рукой, русские строки читаемы, metadata.yaml сокращен до версии формата. - написан справочник docs/architecture/superset.md: устройство зоны, дерево импорта, маршрут свежего экспорта, ловушки импорта. - в docs/architecture/dm.md добавлена ссылка на справочник зоны. - Проверка: - docker compose run --rm superset-init — импорт начисто, затем три графика отдают данные через API (54/48/10 строк). - прогон рецепта «чистая установка» из справочника: сброс базы superset в postgres-metadata, импорт, активы на месте. - make lint и make check-services зеленые (7/7). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c999153acb
commit
3ffce6387e
10 files changed
+736
-3
No files matched your search
@@ -0,0 +1,31 @@
|
||||
slice_name: Сверка purchase и заказов
|
||||
description: null
|
||||
certified_by: null
|
||||
certification_details: null
|
||||
viz_type: pivot_table_v2
|
||||
params:
|
||||
viz_type: pivot_table_v2
|
||||
groupbyRows:
|
||||
- order_day
|
||||
groupbyColumns:
|
||||
- mismatch_class
|
||||
metrics:
|
||||
- order_count
|
||||
adhoc_filters:
|
||||
- expressionType: SIMPLE
|
||||
subject: order_day
|
||||
operator: TEMPORAL_RANGE
|
||||
comparator: No filter
|
||||
clause: WHERE
|
||||
aggregateFunction: Sum
|
||||
metricsLayout: COLUMNS
|
||||
rowOrder: key_a_to_z
|
||||
colOrder: key_a_to_z
|
||||
order_desc: true
|
||||
row_limit: 10000
|
||||
valueFormat: SMART_NUMBER
|
||||
date_format: smart_date
|
||||
cache_timeout: null
|
||||
uuid: 19600000-0000-4000-8000-000000000102
|
||||
version: 1.0.0
|
||||
dataset_uuid: 19600000-0000-4000-8000-000000000002
|
||||
@@ -0,0 +1,30 @@
|
||||
slice_name: Выручка по дням и категориям
|
||||
description: null
|
||||
certified_by: null
|
||||
certification_details: null
|
||||
viz_type: echarts_timeseries_bar
|
||||
params:
|
||||
viz_type: echarts_timeseries_bar
|
||||
x_axis: report_date
|
||||
metrics:
|
||||
- revenue
|
||||
groupby:
|
||||
- product_category
|
||||
adhoc_filters:
|
||||
- expressionType: SIMPLE
|
||||
subject: report_date
|
||||
operator: TEMPORAL_RANGE
|
||||
comparator: No filter
|
||||
clause: WHERE
|
||||
row_limit: 10000
|
||||
stack: Stack
|
||||
orientation: vertical
|
||||
show_legend: true
|
||||
rich_tooltip: true
|
||||
show_value: false
|
||||
y_axis_format: ',.2f'
|
||||
x_axis_time_format: smart_date
|
||||
cache_timeout: null
|
||||
uuid: 19600000-0000-4000-8000-000000000101
|
||||
version: 1.0.0
|
||||
dataset_uuid: 19600000-0000-4000-8000-000000000001
|
||||
@@ -0,0 +1,29 @@
|
||||
slice_name: Посетители и известные пользователи
|
||||
description: null
|
||||
certified_by: null
|
||||
certification_details: null
|
||||
viz_type: echarts_timeseries_line
|
||||
params:
|
||||
viz_type: echarts_timeseries_line
|
||||
x_axis: report_date
|
||||
metrics:
|
||||
- visitors
|
||||
- known_users
|
||||
groupby: []
|
||||
adhoc_filters:
|
||||
- expressionType: SIMPLE
|
||||
subject: report_date
|
||||
operator: TEMPORAL_RANGE
|
||||
comparator: No filter
|
||||
clause: WHERE
|
||||
row_limit: 10000
|
||||
seriesType: echarts_timeseries_line
|
||||
show_legend: true
|
||||
rich_tooltip: true
|
||||
show_value: false
|
||||
y_axis_format: ',d'
|
||||
x_axis_time_format: smart_date
|
||||
cache_timeout: null
|
||||
uuid: 19600000-0000-4000-8000-000000000103
|
||||
version: 1.0.0
|
||||
dataset_uuid: 19600000-0000-4000-8000-000000000003
|
||||
@@ -0,0 +1,105 @@
|
||||
dashboard_title: Бизнес-сюжеты
|
||||
description: null
|
||||
css: null
|
||||
slug: business-stories
|
||||
certified_by: null
|
||||
certification_details: null
|
||||
published: true
|
||||
uuid: 19600000-0000-4000-8000-000000000201
|
||||
position:
|
||||
DASHBOARD_VERSION_KEY: v2
|
||||
ROOT_ID:
|
||||
id: ROOT_ID
|
||||
type: ROOT
|
||||
children:
|
||||
- GRID_ID
|
||||
GRID_ID:
|
||||
id: GRID_ID
|
||||
type: GRID
|
||||
parents:
|
||||
- ROOT_ID
|
||||
children:
|
||||
- ROW-revenue
|
||||
- ROW-pvo
|
||||
- ROW-traffic
|
||||
ROW-revenue:
|
||||
id: ROW-revenue
|
||||
type: ROW
|
||||
parents:
|
||||
- ROOT_ID
|
||||
- GRID_ID
|
||||
children:
|
||||
- CHART-revenue
|
||||
meta:
|
||||
background: BACKGROUND_TRANSPARENT
|
||||
CHART-revenue:
|
||||
id: CHART-revenue
|
||||
type: CHART
|
||||
parents:
|
||||
- ROOT_ID
|
||||
- GRID_ID
|
||||
- ROW-revenue
|
||||
children: []
|
||||
meta:
|
||||
chartId: 1
|
||||
height: 50
|
||||
width: 12
|
||||
sliceName: Выручка по дням и категориям
|
||||
uuid: 19600000-0000-4000-8000-000000000101
|
||||
ROW-pvo:
|
||||
id: ROW-pvo
|
||||
type: ROW
|
||||
parents:
|
||||
- ROOT_ID
|
||||
- GRID_ID
|
||||
children:
|
||||
- CHART-pvo
|
||||
meta:
|
||||
background: BACKGROUND_TRANSPARENT
|
||||
CHART-pvo:
|
||||
id: CHART-pvo
|
||||
type: CHART
|
||||
parents:
|
||||
- ROOT_ID
|
||||
- GRID_ID
|
||||
- ROW-pvo
|
||||
children: []
|
||||
meta:
|
||||
chartId: 2
|
||||
height: 50
|
||||
width: 12
|
||||
sliceName: Сверка purchase и заказов
|
||||
uuid: 19600000-0000-4000-8000-000000000102
|
||||
ROW-traffic:
|
||||
id: ROW-traffic
|
||||
type: ROW
|
||||
parents:
|
||||
- ROOT_ID
|
||||
- GRID_ID
|
||||
children:
|
||||
- CHART-traffic
|
||||
meta:
|
||||
background: BACKGROUND_TRANSPARENT
|
||||
CHART-traffic:
|
||||
id: CHART-traffic
|
||||
type: CHART
|
||||
parents:
|
||||
- ROOT_ID
|
||||
- GRID_ID
|
||||
- ROW-traffic
|
||||
children: []
|
||||
meta:
|
||||
chartId: 3
|
||||
height: 50
|
||||
width: 12
|
||||
sliceName: Посетители и известные пользователи
|
||||
uuid: 19600000-0000-4000-8000-000000000103
|
||||
metadata:
|
||||
color_scheme: supersetColors
|
||||
cross_filters_enabled: false
|
||||
chart_configuration: {}
|
||||
expanded_slices: {}
|
||||
default_filters: '{}'
|
||||
native_filter_configuration: []
|
||||
theme_uuid: null
|
||||
version: 1.0.0
|
||||
@@ -0,0 +1,106 @@
|
||||
table_name: daily_traffic_v
|
||||
main_dttm_col: report_date
|
||||
currency_code_column: null
|
||||
description: null
|
||||
default_endpoint: null
|
||||
offset: 0
|
||||
cache_timeout: null
|
||||
catalog: null
|
||||
schema: dm
|
||||
sql: null
|
||||
params: null
|
||||
template_params: null
|
||||
filter_select_enabled: true
|
||||
fetch_values_predicate: null
|
||||
extra: null
|
||||
normalize_columns: false
|
||||
always_filter_main_dttm: false
|
||||
folders: null
|
||||
uuid: 19600000-0000-4000-8000-000000000003
|
||||
metrics:
|
||||
- metric_name: known_users
|
||||
verbose_name: Известные пользователи
|
||||
metric_type: null
|
||||
expression: SUM(known_users)
|
||||
description: null
|
||||
d3format: ',d'
|
||||
currency: null
|
||||
extra: null
|
||||
warning_text: null
|
||||
- metric_name: visitors
|
||||
verbose_name: Посетители
|
||||
metric_type: null
|
||||
expression: SUM(visitors)
|
||||
description: null
|
||||
d3format: ',d'
|
||||
currency: null
|
||||
extra: null
|
||||
warning_text: null
|
||||
columns:
|
||||
- column_name: _load_ts
|
||||
verbose_name: Время загрузки
|
||||
is_dttm: true
|
||||
is_active: true
|
||||
type: DATETIME64(3, 'UTC')
|
||||
advanced_data_type: null
|
||||
groupby: true
|
||||
filterable: true
|
||||
expression: null
|
||||
description: null
|
||||
python_date_format: null
|
||||
datetime_format: null
|
||||
extra: null
|
||||
- column_name: known_users
|
||||
verbose_name: Известные пользователи
|
||||
is_dttm: false
|
||||
is_active: true
|
||||
type: UINT64
|
||||
advanced_data_type: null
|
||||
groupby: true
|
||||
filterable: true
|
||||
expression: null
|
||||
description: null
|
||||
python_date_format: null
|
||||
datetime_format: null
|
||||
extra: null
|
||||
- column_name: _load_id
|
||||
verbose_name: Запуск загрузки
|
||||
is_dttm: false
|
||||
is_active: true
|
||||
type: STRING
|
||||
advanced_data_type: null
|
||||
groupby: true
|
||||
filterable: true
|
||||
expression: null
|
||||
description: null
|
||||
python_date_format: null
|
||||
datetime_format: null
|
||||
extra: null
|
||||
- column_name: visitors
|
||||
verbose_name: Посетители
|
||||
is_dttm: false
|
||||
is_active: true
|
||||
type: UINT64
|
||||
advanced_data_type: null
|
||||
groupby: true
|
||||
filterable: true
|
||||
expression: null
|
||||
description: null
|
||||
python_date_format: null
|
||||
datetime_format: null
|
||||
extra: null
|
||||
- column_name: report_date
|
||||
verbose_name: Дата
|
||||
is_dttm: true
|
||||
is_active: true
|
||||
type: DATE
|
||||
advanced_data_type: null
|
||||
groupby: true
|
||||
filterable: true
|
||||
expression: null
|
||||
description: null
|
||||
python_date_format: null
|
||||
datetime_format: null
|
||||
extra: null
|
||||
version: 1.0.0
|
||||
database_uuid: 4b8f2c6e-1d3a-4f5b-9c7d-2e8a1f0b3c5d
|
||||
@@ -0,0 +1,136 @@
|
||||
table_name: purchase_vs_orders_v
|
||||
main_dttm_col: order_day
|
||||
currency_code_column: null
|
||||
description: null
|
||||
default_endpoint: null
|
||||
offset: 0
|
||||
cache_timeout: null
|
||||
catalog: null
|
||||
schema: dm
|
||||
sql: null
|
||||
params: null
|
||||
template_params: null
|
||||
filter_select_enabled: true
|
||||
fetch_values_predicate: null
|
||||
extra: null
|
||||
normalize_columns: false
|
||||
always_filter_main_dttm: false
|
||||
folders: null
|
||||
uuid: 19600000-0000-4000-8000-000000000002
|
||||
metrics:
|
||||
- metric_name: order_count
|
||||
verbose_name: Количество заказов
|
||||
metric_type: null
|
||||
expression: COUNT(order_id)
|
||||
description: null
|
||||
d3format: ',d'
|
||||
currency: null
|
||||
extra: null
|
||||
warning_text: null
|
||||
columns:
|
||||
- column_name: items_total
|
||||
verbose_name: Сумма позиций заказа
|
||||
is_dttm: false
|
||||
is_active: true
|
||||
type: NULLABLE(DECIMAL(18, 2))
|
||||
advanced_data_type: null
|
||||
groupby: true
|
||||
filterable: true
|
||||
expression: null
|
||||
description: null
|
||||
python_date_format: null
|
||||
datetime_format: null
|
||||
extra: null
|
||||
- column_name: _load_ts
|
||||
verbose_name: Время загрузки
|
||||
is_dttm: true
|
||||
is_active: true
|
||||
type: DATETIME64(3, 'UTC')
|
||||
advanced_data_type: null
|
||||
groupby: true
|
||||
filterable: true
|
||||
expression: null
|
||||
description: null
|
||||
python_date_format: null
|
||||
datetime_format: null
|
||||
extra: null
|
||||
- column_name: declared_revenue
|
||||
verbose_name: Выручка purchase
|
||||
is_dttm: false
|
||||
is_active: true
|
||||
type: NULLABLE(DECIMAL(18, 2))
|
||||
advanced_data_type: null
|
||||
groupby: true
|
||||
filterable: true
|
||||
expression: null
|
||||
description: null
|
||||
python_date_format: null
|
||||
datetime_format: null
|
||||
extra: null
|
||||
- column_name: status
|
||||
verbose_name: Статус заказа
|
||||
is_dttm: false
|
||||
is_active: true
|
||||
type: LOWCARDINALITY(NULLABLE(STRING))
|
||||
advanced_data_type: null
|
||||
groupby: true
|
||||
filterable: true
|
||||
expression: null
|
||||
description: null
|
||||
python_date_format: null
|
||||
datetime_format: null
|
||||
extra: null
|
||||
- column_name: mismatch_class
|
||||
verbose_name: Класс расхождения
|
||||
is_dttm: false
|
||||
is_active: true
|
||||
type: LOWCARDINALITY(STRING)
|
||||
advanced_data_type: null
|
||||
groupby: true
|
||||
filterable: true
|
||||
expression: null
|
||||
description: null
|
||||
python_date_format: null
|
||||
datetime_format: null
|
||||
extra: null
|
||||
- column_name: order_day
|
||||
verbose_name: День заказа
|
||||
is_dttm: true
|
||||
is_active: true
|
||||
type: DATE
|
||||
advanced_data_type: null
|
||||
groupby: true
|
||||
filterable: true
|
||||
expression: null
|
||||
description: null
|
||||
python_date_format: null
|
||||
datetime_format: null
|
||||
extra: null
|
||||
- column_name: _load_id
|
||||
verbose_name: Запуск загрузки
|
||||
is_dttm: false
|
||||
is_active: true
|
||||
type: STRING
|
||||
advanced_data_type: null
|
||||
groupby: true
|
||||
filterable: true
|
||||
expression: null
|
||||
description: null
|
||||
python_date_format: null
|
||||
datetime_format: null
|
||||
extra: null
|
||||
- column_name: order_id
|
||||
verbose_name: Заказ
|
||||
is_dttm: false
|
||||
is_active: true
|
||||
type: STRING
|
||||
advanced_data_type: null
|
||||
groupby: true
|
||||
filterable: true
|
||||
expression: null
|
||||
description: null
|
||||
python_date_format: null
|
||||
datetime_format: null
|
||||
extra: null
|
||||
version: 1.0.0
|
||||
database_uuid: 4b8f2c6e-1d3a-4f5b-9c7d-2e8a1f0b3c5d
|
||||
@@ -0,0 +1,138 @@
|
||||
table_name: revenue_daily_v
|
||||
main_dttm_col: report_date
|
||||
currency_code_column: null
|
||||
description: null
|
||||
default_endpoint: null
|
||||
offset: 0
|
||||
cache_timeout: null
|
||||
catalog: null
|
||||
schema: dm
|
||||
sql: null
|
||||
params: null
|
||||
template_params: null
|
||||
filter_select_enabled: true
|
||||
fetch_values_predicate: null
|
||||
extra: null
|
||||
normalize_columns: false
|
||||
always_filter_main_dttm: false
|
||||
folders: null
|
||||
uuid: 19600000-0000-4000-8000-000000000001
|
||||
metrics:
|
||||
- metric_name: revenue
|
||||
verbose_name: Выручка
|
||||
metric_type: null
|
||||
expression: SUM(revenue)
|
||||
description: null
|
||||
d3format: ',.2f'
|
||||
currency:
|
||||
symbol: ₽
|
||||
symbolPosition: suffix
|
||||
extra: null
|
||||
warning_text: null
|
||||
columns:
|
||||
- column_name: _load_ts
|
||||
verbose_name: Время загрузки
|
||||
is_dttm: true
|
||||
is_active: true
|
||||
type: DATETIME64(3, 'UTC')
|
||||
advanced_data_type: null
|
||||
groupby: true
|
||||
filterable: true
|
||||
expression: null
|
||||
description: null
|
||||
python_date_format: null
|
||||
datetime_format: null
|
||||
extra: null
|
||||
- column_name: aov
|
||||
verbose_name: Средний чек
|
||||
is_dttm: false
|
||||
is_active: true
|
||||
type: DECIMAL(18, 2)
|
||||
advanced_data_type: null
|
||||
groupby: true
|
||||
filterable: true
|
||||
expression: null
|
||||
description: null
|
||||
python_date_format: null
|
||||
datetime_format: null
|
||||
extra: null
|
||||
- column_name: revenue
|
||||
verbose_name: Выручка
|
||||
is_dttm: false
|
||||
is_active: true
|
||||
type: DECIMAL(18, 2)
|
||||
advanced_data_type: null
|
||||
groupby: true
|
||||
filterable: true
|
||||
expression: null
|
||||
description: null
|
||||
python_date_format: null
|
||||
datetime_format: null
|
||||
extra: null
|
||||
- column_name: product_category
|
||||
verbose_name: Категория товара
|
||||
is_dttm: false
|
||||
is_active: true
|
||||
type: LOWCARDINALITY(STRING)
|
||||
advanced_data_type: null
|
||||
groupby: true
|
||||
filterable: true
|
||||
expression: null
|
||||
description: null
|
||||
python_date_format: null
|
||||
datetime_format: null
|
||||
extra: null
|
||||
- column_name: _load_id
|
||||
verbose_name: Запуск загрузки
|
||||
is_dttm: false
|
||||
is_active: true
|
||||
type: STRING
|
||||
advanced_data_type: null
|
||||
groupby: true
|
||||
filterable: true
|
||||
expression: null
|
||||
description: null
|
||||
python_date_format: null
|
||||
datetime_format: null
|
||||
extra: null
|
||||
- column_name: orders
|
||||
verbose_name: Заказы
|
||||
is_dttm: false
|
||||
is_active: true
|
||||
type: UINT64
|
||||
advanced_data_type: null
|
||||
groupby: true
|
||||
filterable: true
|
||||
expression: null
|
||||
description: null
|
||||
python_date_format: null
|
||||
datetime_format: null
|
||||
extra: null
|
||||
- column_name: units
|
||||
verbose_name: Товары
|
||||
is_dttm: false
|
||||
is_active: true
|
||||
type: UINT64
|
||||
advanced_data_type: null
|
||||
groupby: true
|
||||
filterable: true
|
||||
expression: null
|
||||
description: null
|
||||
python_date_format: null
|
||||
datetime_format: null
|
||||
extra: null
|
||||
- column_name: report_date
|
||||
verbose_name: Дата
|
||||
is_dttm: true
|
||||
is_active: true
|
||||
type: DATE
|
||||
advanced_data_type: null
|
||||
groupby: true
|
||||
filterable: true
|
||||
expression: null
|
||||
description: null
|
||||
python_date_format: null
|
||||
datetime_format: null
|
||||
extra: null
|
||||
version: 1.0.0
|
||||
database_uuid: 4b8f2c6e-1d3a-4f5b-9c7d-2e8a1f0b3c5d
|
||||
@@ -1,3 +1 @@
|
||||
version: 1.0.0
|
||||
type: Database
|
||||
timestamp: '2026-07-30T00:00:00+00:00'
|
||||
Reference in new issue
Block a user