setting-up-warehouse-properties
它能做什么
本技能按照表已有的同步计划,将整个数据仓库表或视图映射到 PostHog 中的用户或群组上。适合目前运行脚本向 PostHog 发送用户数据的团队。
适用场景
- ✓当你有每天向 PostHog 发送用户特征的脚本,并希望改由 PostHog 直接拉取时。
- ✓当你想一次性把宽表中的客户属性映射到用户上的时候。
- ✓当你位于数据仓库属性区域,并希望设置完整的表映射时。
技能链接
https://github.com/PostHog/posthog/blob/master/products/customer_analytics/skills/setting-up-warehouse-properties/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请把我们的客户属性表映射为 PostHog 中的用户属性,替代我们每天运行的 identify 脚本。”
每周 5 个新技能,1 分钟读完。
工作原理
AI 会选择哪些列成为属性,以及它们的名称,然后在一次请求中保存整个映射。此后,PostHog 会在每次同步时根据该表更新用户。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Setting up warehouse properties
Warehouse properties write columns from a warehouse table or materialized view onto matching people or groups,
on the schedule that table already syncs on. They replace a cron that sends $set identify events.
The mapping is the whole job. Most tables worth mapping are wide, so the work is deciding which columns become
properties and what they are called — not making many API calls. One source carries the entire mapping:
custom-property-sources-create takes the complete column_property_map in a single request, so never loop
per column.
When to use this skill
- "Sync my
postgres.customer_attributescolumns to person properties" - "We send a daily identify job from our warehouse, can PostHog pull it instead?"
- "Map this table to people" / "reverse ETL into PostHog"
- The user is looking at Data → Warehouse properties and wants a whole table mapped
Use setting-up-a-data-warehouse-source instead when the table is not in the warehouse yet. This skill starts
once the data is syncing.
Tools
| Tool | Purpose |
|---|---|
external-data-schemas-list |
Find a synced table and its schema id (the external_data_schema binding); columns are omitted here |
external-data-schemas-retrieve |
Read one synced table's columns and types by schema id |
view-list |
Find a materialized view and its column schema (the saved_query binding) |
view-get |
Read one materialized view's columns and types by id |
custom-property-definitions-list |
See what warehouse properties already exist for the team |
custom-property-definitions-create |
Create the definition the source attaches to (target_type: person or group) |
custom-property-sources-create |
Bind the definition to the table, carrying the whole column_property_map |
custom-property-sources-backfill |
Populate historical rows after creating the mapping |
custom-property-sources-runs-list |
Check the run funnel after a sync or backfill |
custom-property-sources-sync |
Run the underlying table now |
Person and group targets need the warehouse-person-properties feature. A group target additionally needs the
group:write scope; without it, custom-property-sources-create refuses the group definition.
The flow
1. Find the table and its columns
For a synced table, external-data-schemas-list gives you the schema id (the external_data_schema binding), and
external-data-schemas-retrieve returns that schema's columns and types.
For a materialized view, view-list finds the view and its column schema, and view-get returns one view's columns
by id; a view binds by saved_query instead, and must already be materialized, since an unmaterialized view has no
data to read and the create call rejects it.
2. Pick the identifier column, and say why it matters
Ask which column holds the PostHog distinct ID (person targets) or the group key (group targets). This is
the single most common reason a mapping silently does nothing, so do not guess it from a name like id or
user_id without confirming.
Two properties of the sync are worth stating plainly before the user commits:
- It only updates people or groups that already exist in PostHog. Rows that match nobody are skipped, and
the run reports them as
skipped_missing_person. It does not create people. - Null values are skipped, not written. A column that is null for a row leaves that property as it was. If the user expects a null to clear a property, warehouse properties will not do it.
3. Propose the mapping before creating anything
Build the full column_property_map — {warehouse_column: property_name} — and show it to the user for
approval. Default to **the same name on both side
常见问题
需要逐列单独设置吗?
不需要。整个列映射会在一次请求中保存。
表是否必须已经在数据仓库中?
是的。该表必须已经处于同步状态,连接它是单独的设置步骤。
如何将用户与行进行匹配?
每一行都必须通过唯一 ID 或群组键列,与某个用户或群组相匹配。
详情
作者的原始描述
Populate person or group properties from a data warehouse table or materialized view, so warehouse columns become properties usable in feature flags, cohorts, and insights. Use when the user wants to "sync my Postgres columns to person properties", "map a warehouse table to people", "replace our daily identify cron", "update person properties from the warehouse", or asks for reverse ETL into PostHog. Covers picking the table and the identifier column, proposing a whole-table column mapping in one call, excluding identity and reserved properties, checking collisions with properties that already
repo: PostHog/posthog
热度
- GitHub 星标
- 41k
- 排名
- #6845
- 许可证
- —
- 更新时间
- 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,并以不会让文件臃肿的方式写下,确保规则真正生效。