tuning-incremental-sync-config
Skill này làm gì
Skill này cho phép agent điều chỉnh cài đặt đồng bộ của một bảng đã được kết nối với kho dữ liệu PostHog. Skill dành cho người có bảng đồng bộ quá thường xuyên, quá chậm hoặc dùng sai trường theo dõi.
Khi nào nên dùng
- ✓Khi bạn muốn chuyển một bảng từ làm mới toàn bộ sang đồng bộ gia tăng.
- ✓Khi một bảng đồng bộ quá chậm hoặc quá thường xuyên và bạn muốn đổi lịch.
- ✓Khi bảng nguồn đã thay đổi và cài đặt đồng bộ của nó cần cập nhật theo.
Liên kết skill
https://github.com/PostHog/posthog/blob/master/products/warehouse_sources/skills/tuning-incremental-sync-config/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Hãy chuyển bảng orders của tôi sang chỉ đồng bộ các hàng mới và đổi lịch để nó chạy mỗi ngày một lần.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent đọc cài đặt hiện tại của bảng và cập nhật những gì bạn yêu cầu. Hầu hết thay đổi có hiệu lực ở lần đồng bộ tiếp theo, nhưng một số thay đổi, chẳng hạn khóa chính, cần xử lý cẩn thận để tránh làm hỏng dữ liệu.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Tuning incremental sync config
A sync's configuration lives on the ExternalDataSchema and can be changed any time via
external-data-schemas-partial-update. Most changes are non-destructive (take effect on the next sync), but a few
(switching sync_type, changing primary keys) require careful handling to avoid corrupting the synced data.
When to use this skill
- The user wants to change how an already-connected table is synced
- A diagnosis flagged the incremental field or primary key as wrong
- The table is syncing too often / not often enough
- Switching an incremental table to CDC (or vice versa)
- The source table was changed on the other side (new columns, dropped columns) and the sync config needs to catch up
If the user is setting up a brand-new source, use setting-up-a-data-warehouse-source instead — configuration is
chosen at creation time there.
Available tools
| Tool | Purpose |
|---|---|
external-data-schemas-retrieve |
Current sync_type, incremental_field, PKs, sync_frequency |
external-data-schemas-incremental-fields-create |
Refresh candidate incremental fields from the live source |
external-data-schemas-partial-update |
Apply the config change |
external-data-schemas-reload |
Trigger a sync with the new config |
external-data-schemas-resync |
Wipe and re-import from scratch when the change invalidates existing data |
external-data-schemas-delete-data |
Drop the synced table while keeping the schema entry |
external-data-sources-check-cdc-prerequisites-create |
Pre-flight Postgres CDC (only when switching to/from CDC) |
external-data-sources-webhook-info-retrieve |
Current webhook state (when switching to/from sync_type=webhook) |
external-data-sources-create-webhook-create |
Register a webhook after switching a schema to sync_type=webhook |
external-data-sources-update-webhook-inputs-create |
Rotate a webhook signing secret |
external-data-sources-delete-webhook-create |
Unregister webhook when switching schemas off sync_type=webhook |
The fields you can tune
From the partial-update endpoint:
| Field | Values | Notes |
|---|---|---|
sync_type |
full_refresh, incremental, append, cdc, webhook |
Source must support the target type — check via incremental-fields |
incremental_field |
Column name from the source | Must appear in incremental_fields list for the schema |
incremental_field_type |
datetime, date, timestamp, integer, numeric, objectid |
Must match the column's real type |
primary_key_columns |
Array of column names | Required for CDC. Used for upsert dedup on incremental |
cdc_table_mode |
consolidated, cdc_only, both |
Only meaningful when sync_type=cdc |
sync_frequency |
5min, 15min, 30min, 1hour, 6hour, 12hour, 24hour, 7day, 30day, never |
How often the table syncs. CDC: how often changes load, 7day max |
sync_time_of_day |
HH:MM:SS |
When sync_frequency is daily/weekly-scale |
should_sync |
true / false |
Câu hỏi thường gặp
Thay đổi cài đặt đồng bộ có xóa dữ liệu của tôi không?
Hầu hết thay đổi là an toàn và áp dụng ở lần đồng bộ tiếp theo. Một vài thay đổi cần xử lý cẩn thận để không làm hỏng dữ liệu đã đồng bộ.
Tôi có thể chuyển một bảng sang change data capture không?
Có. Skill bao quát việc chuyển giữa chế độ đồng bộ gia tăng và change data capture.
Tôi có nên dùng cái này cho một nguồn mới không?
Không. Với nguồn mới, cài đặt được chọn khi thiết lập, nên skill thiết lập nguồn là phù hợp.
Chi tiết
Mô tả gốc của tác giả
Change the sync configuration of an existing data warehouse schema — switch sync_type, pick a different incremental_field, set primary_key_columns, choose cdc_table_mode, or change sync_frequency. Use when the user asks "switch my orders table from full refresh to incremental", "this table is syncing too slowly / too frequently", "I need to pick a different incremental column", "set up CDC for this Postgres table", or when diagnosis of a failing sync pointed to an incremental-field or PK misconfiguration.
repo: PostHog/posthog
Độ phổ biến
- Sao GitHub
- 41k
- Vị trí xếp hạng
- #6971
- Giấy phép
- —
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
depot-ci
41kGiúp agent của bạn thiết lập và chạy quy trình Depot CI, một lựa chọn thay thế GitHub Actions, gồm chuyển các quy trình hiện có và đọc nhật ký chạy.
depot-container-builds
41kGiúp agent của bạn build image Docker trên các builder từ xa của Depot, gồm image đa nền tảng, đẩy lên registry và sửa lỗi build.
depot-github-runners
41kGiúp agent của bạn chuyển các job GitHub Actions sang runner do Depot quản lý, chọn kích thước và nhãn runner, và xử lý lỗi thiết lập runner.
editing-agents-md
41kGiúp agent của bạn quyết định một quy tắc nên nằm trong file AGENTS.md hay CLAUDE.md, và viết sao cho quy tắc được tuân thủ mà file không bị phình to.
Skill tương tự
discrawl
394kCho phép agent của bạn tìm kiếm và tóm tắt kho lưu trữ tin nhắn Discord trên máy, kiểm tra độ mới của dữ liệu và đọc tin nhắn trực tiếp.
clickhouse-io
280kGiúp agent của bạn tối ưu truy vấn và schema trong ClickHouse theo thực hành tốt nhất cho phân tích dữ liệu hiệu năng cao khi truy vấn chậm.
scientific-db-pubmed-database
280kGiúp agent của bạn tìm bài báo khoa học trong lĩnh vực y sinh. Hữu ích cho nghiên cứu cần thông tin y khoa cụ thể.