adding-warehouse-person-properties
它能做什么
本技能将已同步的数据仓库表中的列映射为 PostHog 中的用户或群组属性。适合把客户信息保存在数据仓库中、并希望在 PostHog 中用于定向和洞察的团队。
适用场景
- ✓当你想把账单表中的套餐等级或收入添加到用户上时。
- ✓当你想使用数据仓库中的数据来定向功能开关或人群的时候。
- ✓当数据仓库中的值没有显示在用户上,你需要查明原因时。
技能链接
https://github.com/PostHog/posthog/blob/master/products/customer_analytics/skills/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请把我 Stripe 表中的套餐等级列添加到 PostHog 中的每位用户上,以便我用功能开关对他们进行定向。”
每周 5 个新技能,1 分钟读完。
工作原理
你需要选择源表、匹配的 ID 列,以及要复制的列。随后,PostHog 会把这些列写为普通的用户或群组属性,其使用方式与任何其他属性一样。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Adding warehouse person and group properties
A warehouse property mapping reads a synced warehouse table and writes chosen columns onto people or groups.
Each row is matched to a person by a distinct ID column, or to a group by a group key column. The mapped
columns are then written as ordinary person properties ($set) or group properties ($groupidentify).
The result is not a separate kind of property. After the first sync the values behave like any other person or group property, so they work in feature flags, cohorts, insights, surveys, and replay filters. See references/where-they-can-be-used.md for the full surface list and the caveats that matter per surface.
In the UI this lives at Data > Warehouse properties, with a Persons tab and a Groups tab.
When to use this skill
- "Add plan tier from my Stripe table to my people"
- "I want to run a feature flag only for customers with ARR over 50k"
- "Sync my Postgres
accountstable onto organizations" - "Why isn't my warehouse property showing up on people?"
- "Backfill the warehouse property I just added"
Use a different skill when:
- The warehouse source does not exist yet. Connect it first with
setting-up-a-data-warehouse-source. - The user wants a Customer analytics account property. That target reads a materialized view, not a
synced table, and uses
saved_query+source_columninstead of the column map below. - The user only wants to query warehouse data. Join it in HogQL instead of writing properties onto people.
Prerequisites
Check these before you start. Each one produces a confusing failure later if it is missing.
| Requirement | Why | How it fails |
|---|---|---|
The warehouse-person-properties feature is enabled for the project |
Gates the whole feature | Definition create rejects a person or group target; sync and backfill return 400 |
| A synced warehouse table | Only tables imported by a data warehouse source carry the schema a source binds to | Views, saved queries, and materialized views cannot be used for person or group targets |
A column holding a real person distinct_id, or a real group key |
Rows are matched on this column | Runs complete with a high skipped_missing_person count and no properties change |
| The caller has warehouse source editor access | Mapping a table drives its billable source | Create is rejected even when the caller holds account:write |
For group targets: the groups paid feature, an existing group type, and group:read / group:write |
Group properties are keyed per group type | The Groups tab is hidden; group tools reject the call |
Tools
| Tool | Purpose |
|---|---|
external-data-schemas-list |
Find the table and its schema id. The schema id is what a source binds to |
query (HogQL) |
Inspect columns and sample the key column before you map anything |
custom-property-definitions-create |
Create the mapping's definition with target_type of person or group |
custom-property-sources-create |
Bind the definition to the warehouse table and column map |
custom-property-sources-list / -retrieve |
See sync status, schedule, and the latest run |
常见问题
我需要先连接数据仓库源吗?
需要。该数据源必须已经存在并处于同步状态。连接数据源是单独的步骤。
这些属性可以在哪些地方使用?
凡是用户和群组属性可以使用的地方都可以,例如功能开关、人群、洞察、问卷和工作流。
这些值会自动更新吗?
会,按源表同步的计划进行更新。
详情
作者的原始描述
Sync columns from a synced data warehouse table onto PostHog person or group properties, so warehouse data becomes usable anywhere person and group properties already work: feature flag targeting, cohorts, insight filters and breakdowns, surveys, session replay filters, workflows, and the person profile. Use when the user wants to "add a person property from my warehouse", "enrich people with Stripe/Postgres/Salesforce data", "put ARR or plan tier on my persons", "target a feature flag by a warehouse column", "sync warehouse columns onto groups or organizations", or wants to inspect, backfill,
repo: PostHog/posthog
热度
- GitHub 星标
- 41k
- 排名
- #6844
- 许可证
- —
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
depot-ci
41k帮你的智能体设置并运行 Depot CI 工作流(GitHub Actions 的替代方案),包括迁移现有工作流和读取运行日志。
depot-container-builds
41k帮你的智能体在 Depot 的远程构建器上构建 Docker 镜像,包括多平台镜像、推送到镜像仓库,以及修复构建失败。
depot-github-runners
41k帮你的智能体把 GitHub Actions 任务迁移到 Depot 托管的运行器上,选择运行器规格和标签,并排查运行器设置问题。
editing-agents-md
41k帮你的智能体判断某条规则应写入 AGENTS.md 还是 CLAUDE.md,并以不会让文件臃肿的方式写下,确保规则真正生效。