运营数据场景
清洗运营数据,计算关键指标,定时导出报表
常见任务
- 用户行为数据分析
- 产品使用指标统计
- 营销效果评估
- 日/周/月度报表自动生成
处理步骤
1. 清洗脏数据
[
{ "type": "normalize", "field": "date", "mode": "date" },
{ "type": "fillMissing", "field": "user_segment", "strategy": "default", "defaultValue": "unknown" },
{ "type": "replace", "field": "platform", "search": "iOS", "replace": "ios" },
{ "type": "replace", "field": "platform", "search": "Android", "replace": "android" }
]
2. 提取时间维度
[
{ "type": "compute", "targetField": "event_date", "formula": "DATE_FORMAT(timestamp, 'YYYY-MM-DD')" },
{ "type": "compute", "targetField": "event_week", "formula": "CONCAT(DATE_FORMAT(timestamp, 'YYYY'), '-W', DATE_PART(timestamp, 'weekday'))" },
{ "type": "compute", "targetField": "event_month", "formula": "DATE_FORMAT(timestamp, 'YYYY-MM')" }
]
3. 计算用户指标
[
{ "type": "compute", "targetField": "is_new_user", "formula": "IF(first_visit_date == event_date, 'yes', 'no')" },
{ "type": "compute", "targetField": "session_duration_min", "formula": "ROUND(session_duration / 60, 2)" }
]
4. 聚合关键指标
{
"type": "aggregate",
"groupBy": ["event_date", "platform"],
"targets": [
{ "field": "user_id", "agg": "distinct", "outputField": "active_users" },
{ "field": "session_id", "agg": "count", "outputField": "sessions" },
{ "field": "session_duration", "agg": "avg", "outputField": "avg_session_duration" },
{ "field": "is_new_user", "agg": "count", "outputField": "new_users" }
]
}
关键指标
- 📊 日活用户 (DAU) - 每日独立用户数
- 📊 月活用户 (MAU) - 每月独立用户数
- ⏱️ 平均会话时长 - 用户平均停留时间
- 🆕 新用户数 - 首次访问用户
- ↩️ 留存率 - 用户回头率