返回 Skill 列表
extension
分类: 开发与工程无需 API Key

cdp-lite-adapter

将用户探索器(CDP-lite)原型适应新的数据源,通过将输入导出映射到构建管道,更新适配器/丰富处理,并保持输出JSON模式以供UI使用。当被要求连接真实数据、替换输入或修改构建输出/UI合同时使用。

person作者: jakexiaohubgithub

CDP-lite Adapter

Overview

Map new data sources into the existing CDP-lite build pipeline while keeping output schemas stable for the UI.

Workflow

  1. Identify input formats and field names for activity + profiles.
  2. Update adapters to normalize into the expected fields.
  3. Adjust enrichments (score/segments) only if business rules change.
  4. Run make build and validate data/ outputs against the UI contract.

Adapter Targets

  • scripts/adapters/activity.js
    • Normalize to: email, date, login, total_views, unique_views, dashboard_name (optional)
  • scripts/adapters/profiles.js
    • Normalize to: email, name, department, geo, title, manager_email, skip_level_email

Output Contract

Preserve the output schemas in:

  • data/users/u_<sha1>.json
  • data/index.json
  • data/facets.json
  • data/dashboards.json

For field-level details, read references/data-contract.md.

Notes

  • Weekly activity must include every week from 2025-06-01 to today, Monday week start.
  • Email is the primary key; always normalize to lowercase + trim.
  • Keep activity_score_bucket in the index for filtering.