[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-posthog-tuning-incremental-sync-config":3,"mdc--y0ahyq-key":41,"related-repo-posthog-tuning-incremental-sync-config":2287,"related-org-posthog-tuning-incremental-sync-config":2409},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":26,"repoUrl":27,"updatedAt":28,"license":29,"forks":30,"topics":31,"repo":36,"sourceUrl":39,"mdContent":40},"tuning-incremental-sync-config","configure data warehouse sync settings","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 \u002F 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.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"posthog","PostHog","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fposthog.png",[12,16,17,20,23],{"name":13,"slug":14,"type":15},"Configuration","configuration","tag",{"name":9,"slug":8,"type":15},{"name":18,"slug":19,"type":15},"Data Engineering","data-engineering",{"name":21,"slug":22,"type":15},"Data Warehouse","data-warehouse",{"name":24,"slug":25,"type":15},"ETL","etl",59,"https:\u002F\u002Fgithub.com\u002FPostHog\u002Fai-plugin","2026-06-18T08:18:51.639466",null,11,[32,33,34,35],"claude-code-plugin","codex-plugin","cursor-plugin","gemini-cli-extension",{"repoUrl":27,"stars":26,"forks":30,"topics":37,"description":38},[32,33,34,35],"Official PostHog plugin for Claude Code, Cursor, Gemini, Codex and other AI coding tools","https:\u002F\u002Fgithub.com\u002FPostHog\u002Fai-plugin\u002Ftree\u002FHEAD\u002Fskills\u002Ftuning-incremental-sync-config","---\nname: tuning-incremental-sync-config\ndescription: >\n  Change the sync configuration of an existing data warehouse schema — switch sync_type, pick a different\n  incremental_field, set primary_key_columns, choose cdc_table_mode, or change sync_frequency. Use when the user\n  asks \"switch my orders table from full refresh to incremental\", \"this table is syncing too slowly \u002F too\n  frequently\", \"I need to pick a different incremental column\", \"set up CDC for this Postgres table\", or when\n  diagnosis of a failing sync pointed to an incremental-field or PK misconfiguration.\n---\n\n# Tuning incremental sync config\n\nA sync's configuration lives on the `ExternalDataSchema` and can be changed any time via\n`external-data-schemas-partial-update`. Most changes are non-destructive (take effect on the next sync), but a few\n(switching sync_type, changing primary keys) require careful handling to avoid corrupting the synced data.\n\n## When to use this skill\n\n- The user wants to change how an already-connected table is synced\n- A diagnosis flagged the incremental field or primary key as wrong\n- The table is syncing too often \u002F not often enough\n- Switching an incremental table to CDC (or vice versa)\n- The source table was changed on the other side (new columns, dropped columns) and the sync config needs to catch up\n\nIf the user is setting up a brand-new source, use `setting-up-a-data-warehouse-source` instead — configuration is\nchosen at creation time there.\n\n## Available tools\n\n| Tool                                                   | Purpose                                                                   |\n| ------------------------------------------------------ | ------------------------------------------------------------------------- |\n| `external-data-schemas-retrieve`                       | Current sync_type, incremental_field, PKs, sync_frequency                 |\n| `external-data-schemas-incremental-fields-create`      | Refresh candidate incremental fields from the live source                 |\n| `external-data-schemas-partial-update`                 | Apply the config change                                                   |\n| `external-data-schemas-reload`                         | Trigger a sync with the new config                                        |\n| `external-data-schemas-resync`                         | Wipe and re-import from scratch when the change invalidates existing data |\n| `external-data-schemas-delete-data`                    | Drop the synced table while keeping the schema entry                      |\n| `external-data-sources-check-cdc-prerequisites-create` | Pre-flight Postgres CDC (only when switching to\u002Ffrom CDC)                 |\n| `external-data-sources-webhook-info-retrieve`          | Current webhook state (when switching to\u002Ffrom sync_type=webhook)          |\n| `external-data-sources-create-webhook-create`          | Register a webhook after switching a schema to sync_type=webhook          |\n| `external-data-sources-update-webhook-inputs-create`   | Rotate a webhook signing secret                                           |\n| `external-data-sources-delete-webhook-create`          | Unregister webhook when switching schemas off sync_type=webhook           |\n\n## The fields you can tune\n\nFrom the partial-update endpoint:\n\n| Field                    | Values                                                                                           | Notes                                                              |\n| ------------------------ | ------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------ |\n| `sync_type`              | `full_refresh`, `incremental`, `append`, `cdc`, `webhook`                                        | Source must support the target type — check via incremental-fields |\n| `incremental_field`      | Column name from the source                                                                      | Must appear in `incremental_fields` list for the schema            |\n| `incremental_field_type` | `datetime`, `date`, `timestamp`, `integer`, `numeric`, `objectid`                                | Must match the column's real type                                  |\n| `primary_key_columns`    | Array of column names                                                                            | Required for CDC. Used for upsert dedup on incremental             |\n| `cdc_table_mode`         | `consolidated`, `cdc_only`, `both`                                                               | Only meaningful when sync_type=cdc                                 |\n| `sync_frequency`         | `1min`, `5min`, `15min`, `30min`, `1hour`, `6hour`, `12hour`, `24hour`, `7day`, `30day`, `never` | Applies to all non-CDC types                                       |\n| `sync_time_of_day`       | `HH:MM:SS`                                                                                       | When sync_frequency is daily\u002Fweekly-scale                          |\n| `should_sync`            | `true` \u002F `false`                                                                                 | Pause the schema without deleting it                               |\n\n## Workflow\n\n### Step 1 — Read the current config\n\nAlways start with `external-data-schemas-retrieve({id})`. Understanding the current state prevents mistakes like\n\"fixing\" an incremental_field that's actually correct.\n\nNote:\n\n- Current `sync_type`, `incremental_field`, `incremental_field_type`, `primary_key_columns`\n- Current `status` (don't tune a schema that's currently `Running` — wait or cancel first)\n- `last_synced_at` (so you can tell if the next sync worked)\n- `latest_error` if present (the error often tells you exactly what to change)\n\n### Step 2 — If changing sync_type or incremental_field, refresh candidates\n\nCall `external-data-schemas-incremental-fields-create({id})`. Even though the operation name says \"create\", it\nre-reads the source and returns the current candidate fields — use it to confirm the field you want to set actually\nexists on the source and which sync types are now available for this table.\n\nThe response:\n\n```text\n{\n  \"incremental_fields\": [{\"field\": \"updated_at\", \"type\": \"datetime\", ...}, ...],\n  \"incremental_available\": true,\n  \"append_available\": true,\n  \"cdc_available\": true,\n  \"full_refresh_available\": true,\n  \"detected_primary_keys\": [\"id\"],\n  \"available_columns\": [...]\n}\n```\n\nIf your target `incremental_field` isn't in the list, tell the user — they need to either pick a different field or\nchange the source table to add one.\n\n### Step 3 — Apply the change\n\nCall `external-data-schemas-partial-update({id}, {...changed fields})`.\n\n**Only send the fields that are actually changing.** Partial update means unspecified fields stay as they are.\n\nExamples:\n\n```json\n\u002F\u002F Switch from full_refresh to incremental\n{\n  \"sync_type\": \"incremental\",\n  \"incremental_field\": \"updated_at\",\n  \"incremental_field_type\": \"datetime\"\n}\n\n\u002F\u002F Change sync frequency to hourly\n{\"sync_frequency\": \"1hour\"}\n\n\u002F\u002F Fix wrong PK on a CDC table\n{\"primary_key_columns\": [\"tenant_id\", \"order_id\"]}\n\n\u002F\u002F Pause a schema\n{\"should_sync\": false}\n```\n\n### Step 4 — Decide whether existing data is still valid\n\nThis is the step that's easy to get wrong. Some config changes invalidate the synced data; others don't.\n\n**Changes that DON'T invalidate existing data:**\n\n- `sync_frequency`, `sync_time_of_day` — scheduling only\n- `should_sync` — on\u002Foff\n- `cdc_table_mode` in most cases — next sync will start writing to the new shape, but historical consolidated rows\n  stay valid\n- Switching between `incremental` and `full_refresh` with the same `incremental_field` — next sync just re-runs\n  fresh\n- Switching to or from `sync_type: \"webhook\"` — the synced data stays valid; only the ingestion path changes.\n  Remember to register or unregister the webhook (see sections below) alongside the sync_type change.\n\n**Changes that MAY invalidate existing data and need a resync:**\n\n- Changing `incremental_field` to a different column — the high-water mark is from the old column and won't match.\n  Without a resync you'll miss rows that were updated between the two fields' histories.\n- Changing `primary_key_columns` — existing rows may be deduplicated incorrectly against new PK definitions.\n- Switching from `full_refresh` to `append` — the existing rows don't have the version-history shape that append\n  expects.\n- Switching from `append` to `full_refresh` — opposite problem; you'll end up with duplicate historical versions.\n- Switching to\u002Ffrom `cdc` — the table shape changes fundamentally.\n\nWhen the change invalidates data, the clean flow is:\n\n1. `external-data-schemas-partial-update` with the new config\n2. Warn the user this is destructive\n3. `external-data-schemas-resync` to wipe and re-import under the new config\n\nOr equivalently, `external-data-schemas-delete-data` → `external-data-schemas-reload`. `delete-data` + `reload` is\ncleaner when the table is large and the user wants to start from zero.\n\n### Step 5 — Trigger and confirm\n\nFor non-destructive changes, call `external-data-schemas-reload({id})` to pick up the new config immediately rather\nthan waiting for the schedule.\n\nWait a moment, then `external-data-schemas-retrieve({id})` to confirm `status = Running` then `Completed`. Report\n`last_synced_at` and any new `latest_error`.\n\n## Specific common changes\n\n### Switching full_refresh → incremental\n\n1. `incremental-fields-create` to confirm the desired field exists and `incremental_available: true`.\n2. `partial-update`: `{sync_type: \"incremental\", incremental_field, incremental_field_type}`.\n3. No data wipe needed — next sync just switches strategy. If the source is growing fast, the next incremental sync\n   is the cheap one.\n\n### Switching incremental → cdc (Postgres only)\n\n1. Run `external-data-sources-check-cdc-prerequisites-create` on the parent source. Only proceed if `valid: true`.\n2. `incremental-fields-create` to confirm `cdc_available: true` and see `detected_primary_keys`.\n3. `partial-update`: `{sync_type: \"cdc\", primary_key_columns: [...], cdc_table_mode: \"consolidated\"}`.\n4. **Resync required** — CDC tables have a different shape. Trigger `external-data-schemas-resync` after the update.\n   Warn the user this wipes existing data.\n\n### Fixing a stale incremental field after schema drift\n\nSource dropped the `updated_at` column. Sync has been failing with \"column does not exist\".\n\n1. `incremental-fields-create` to see what fields remain.\n2. Pick a replacement (or switch to `full_refresh` if none are suitable).\n3. `partial-update` with the new field + type (or new sync_type).\n4. `reload` to retry.\n\n### Changing primary keys on a CDC table\n\n1. `partial-update`: `{primary_key_columns: [...]}`.\n2. **Resync required** — existing CDC tombstones and upsert keys won't match the new PK definition, leading to row\n   duplication or missed updates.\n3. `resync`, warn the user.\n\n### Changing sync_frequency\n\n1. `partial-update`: `{sync_frequency: \"1hour\"}`.\n2. No reload needed — the next scheduled sync picks up the new cadence. Or reload manually if the user wants to\n   confirm nothing broke.\n\n### Switching a schema to `sync_type: \"webhook\"`\n\nOnly works for sources that implement `WebhookSource` (today: Stripe) and tables where `supports_webhooks: true`\nfrom `incremental-fields-create`.\n\n1. `incremental-fields-create` to confirm `supports_webhooks: true` for the table.\n2. `partial-update`: `{sync_type: \"webhook\"}`.\n3. If the source doesn't already have a webhook registered (check with `webhook-info-retrieve`), call\n   `external-data-sources-create-webhook-create({source_id})` to register it.\n4. No resync required — the schema's existing bulk-synced data stays, and the webhook becomes the primary ingestion\n   path once the next reconciliation finishes.\n5. Keep `sync_frequency` set (e.g. `24hour`) — it acts as a safety-net reconciliation in case any webhook delivery\n   is missed.\n\n### Switching off `sync_type: \"webhook\"`\n\n1. `partial-update`: `{sync_type: \"incremental\"}` (or whatever bulk type is appropriate) with the required\n   `incremental_field` + `incremental_field_type`.\n2. If **no other schemas** on the source are still using `sync_type: \"webhook\"`, call\n   `external-data-sources-delete-webhook-create({source_id})` to unregister. Leaving an orphaned webhook\n   registered on the source side just means events will be received and dropped — not harmful, but messy.\n3. If other schemas on the source are still on webhook, leave the webhook registered — it's shared across all\n   webhook-type schemas on the source.\n\n### Rotating a webhook signing secret\n\nThe source's signing secret (e.g. Stripe's `whsec_...`) was rotated, and payloads are now failing signature\nverification.\n\n1. Grab the new secret from the source's dashboard.\n2. `external-data-sources-update-webhook-inputs-create({source_id}, {inputs: {signing_secret: \"whsec_...\"}})`.\n3. No reload needed — the next inbound webhook payload will verify against the new secret.\n\n### Pausing a schema\n\n1. `partial-update`: `{should_sync: false}`. Schema stops syncing but stays configured.\n2. To resume later: `partial-update`: `{should_sync: true}`, then `reload` for an immediate run.\n\n## Important notes\n\n- **Read before you write.** Always retrieve the current config first. `partial-update` doesn't complain if you set a\n  field to the value it already had, but you might be about to change something you didn't realize was already set.\n- **Not every sync_type is available on every schema.** The `incremental-fields-create` response tells you what's\n  available _right now_, which can be different from what was available at creation (e.g. CDC may have been\n  enabled for the team since).\n- **Wipe when the shape changes.** Switching sync strategy often changes the physical table. If you don't resync,\n  you'll be mixing row shapes and queries will return garbage.\n- **CDC needs prerequisites.** Never switch to `sync_type: \"cdc\"` without running `check-cdc-prerequisites-create`\n  first. The sync will just fail immediately.\n- **Don't touch a Running schema.** If the schema is currently running, either wait for it to finish or\n  `external-data-schemas-cancel` before applying the change. Updating config mid-sync can leave the incremental\n  high-water mark inconsistent.\n- **Sync frequency is cheap to change.** Encourage experimentation there. Sync_type and incremental_field are\n  expensive to change — encourage care.\n- **Webhooks are registered at the source level, not the schema level.** Multiple webhook-type schemas on the same\n  source share one webhook registration. Only delete the webhook when the _last_ webhook-type schema on that\n  source is being switched away, otherwise other schemas stop receiving pushes.\n",{"data":42,"body":43},{"name":4,"description":6},{"type":44,"children":45},"root",[46,54,77,84,114,127,133,347,353,358,749,755,762,775,780,853,859,872,877,889,901,907,919,930,935,1275,1281,1286,1294,1372,1380,1454,1459,1488,1523,1529,1542,1583,1589,1595,1639,1645,1724,1730,1742,1787,1793,1832,1838,1862,1873,1900,1980,1991,2055,2061,2074,2097,2103,2149,2155,2281],{"type":47,"tag":48,"props":49,"children":50},"element","h1",{"id":4},[51],{"type":52,"value":53},"text","Tuning incremental sync config",{"type":47,"tag":55,"props":56,"children":57},"p",{},[58,60,67,69,75],{"type":52,"value":59},"A sync's configuration lives on the ",{"type":47,"tag":61,"props":62,"children":64},"code",{"className":63},[],[65],{"type":52,"value":66},"ExternalDataSchema",{"type":52,"value":68}," and can be changed any time via\n",{"type":47,"tag":61,"props":70,"children":72},{"className":71},[],[73],{"type":52,"value":74},"external-data-schemas-partial-update",{"type":52,"value":76},". Most changes are non-destructive (take effect on the next sync), but a few\n(switching sync_type, changing primary keys) require careful handling to avoid corrupting the synced data.",{"type":47,"tag":78,"props":79,"children":81},"h2",{"id":80},"when-to-use-this-skill",[82],{"type":52,"value":83},"When to use this skill",{"type":47,"tag":85,"props":86,"children":87},"ul",{},[88,94,99,104,109],{"type":47,"tag":89,"props":90,"children":91},"li",{},[92],{"type":52,"value":93},"The user wants to change how an already-connected table is synced",{"type":47,"tag":89,"props":95,"children":96},{},[97],{"type":52,"value":98},"A diagnosis flagged the incremental field or primary key as wrong",{"type":47,"tag":89,"props":100,"children":101},{},[102],{"type":52,"value":103},"The table is syncing too often \u002F not often enough",{"type":47,"tag":89,"props":105,"children":106},{},[107],{"type":52,"value":108},"Switching an incremental table to CDC (or vice versa)",{"type":47,"tag":89,"props":110,"children":111},{},[112],{"type":52,"value":113},"The source table was changed on the other side (new columns, dropped columns) and the sync config needs to catch up",{"type":47,"tag":55,"props":115,"children":116},{},[117,119,125],{"type":52,"value":118},"If the user is setting up a brand-new source, use ",{"type":47,"tag":61,"props":120,"children":122},{"className":121},[],[123],{"type":52,"value":124},"setting-up-a-data-warehouse-source",{"type":52,"value":126}," instead — configuration is\nchosen at creation time there.",{"type":47,"tag":78,"props":128,"children":130},{"id":129},"available-tools",[131],{"type":52,"value":132},"Available tools",{"type":47,"tag":134,"props":135,"children":136},"table",{},[137,156],{"type":47,"tag":138,"props":139,"children":140},"thead",{},[141],{"type":47,"tag":142,"props":143,"children":144},"tr",{},[145,151],{"type":47,"tag":146,"props":147,"children":148},"th",{},[149],{"type":52,"value":150},"Tool",{"type":47,"tag":146,"props":152,"children":153},{},[154],{"type":52,"value":155},"Purpose",{"type":47,"tag":157,"props":158,"children":159},"tbody",{},[160,178,195,211,228,245,262,279,296,313,330],{"type":47,"tag":142,"props":161,"children":162},{},[163,173],{"type":47,"tag":164,"props":165,"children":166},"td",{},[167],{"type":47,"tag":61,"props":168,"children":170},{"className":169},[],[171],{"type":52,"value":172},"external-data-schemas-retrieve",{"type":47,"tag":164,"props":174,"children":175},{},[176],{"type":52,"value":177},"Current sync_type, incremental_field, PKs, sync_frequency",{"type":47,"tag":142,"props":179,"children":180},{},[181,190],{"type":47,"tag":164,"props":182,"children":183},{},[184],{"type":47,"tag":61,"props":185,"children":187},{"className":186},[],[188],{"type":52,"value":189},"external-data-schemas-incremental-fields-create",{"type":47,"tag":164,"props":191,"children":192},{},[193],{"type":52,"value":194},"Refresh candidate incremental fields from the live source",{"type":47,"tag":142,"props":196,"children":197},{},[198,206],{"type":47,"tag":164,"props":199,"children":200},{},[201],{"type":47,"tag":61,"props":202,"children":204},{"className":203},[],[205],{"type":52,"value":74},{"type":47,"tag":164,"props":207,"children":208},{},[209],{"type":52,"value":210},"Apply the config change",{"type":47,"tag":142,"props":212,"children":213},{},[214,223],{"type":47,"tag":164,"props":215,"children":216},{},[217],{"type":47,"tag":61,"props":218,"children":220},{"className":219},[],[221],{"type":52,"value":222},"external-data-schemas-reload",{"type":47,"tag":164,"props":224,"children":225},{},[226],{"type":52,"value":227},"Trigger a sync with the new config",{"type":47,"tag":142,"props":229,"children":230},{},[231,240],{"type":47,"tag":164,"props":232,"children":233},{},[234],{"type":47,"tag":61,"props":235,"children":237},{"className":236},[],[238],{"type":52,"value":239},"external-data-schemas-resync",{"type":47,"tag":164,"props":241,"children":242},{},[243],{"type":52,"value":244},"Wipe and re-import from scratch when the change invalidates existing data",{"type":47,"tag":142,"props":246,"children":247},{},[248,257],{"type":47,"tag":164,"props":249,"children":250},{},[251],{"type":47,"tag":61,"props":252,"children":254},{"className":253},[],[255],{"type":52,"value":256},"external-data-schemas-delete-data",{"type":47,"tag":164,"props":258,"children":259},{},[260],{"type":52,"value":261},"Drop the synced table while keeping the schema entry",{"type":47,"tag":142,"props":263,"children":264},{},[265,274],{"type":47,"tag":164,"props":266,"children":267},{},[268],{"type":47,"tag":61,"props":269,"children":271},{"className":270},[],[272],{"type":52,"value":273},"external-data-sources-check-cdc-prerequisites-create",{"type":47,"tag":164,"props":275,"children":276},{},[277],{"type":52,"value":278},"Pre-flight Postgres CDC (only when switching to\u002Ffrom CDC)",{"type":47,"tag":142,"props":280,"children":281},{},[282,291],{"type":47,"tag":164,"props":283,"children":284},{},[285],{"type":47,"tag":61,"props":286,"children":288},{"className":287},[],[289],{"type":52,"value":290},"external-data-sources-webhook-info-retrieve",{"type":47,"tag":164,"props":292,"children":293},{},[294],{"type":52,"value":295},"Current webhook state (when switching to\u002Ffrom sync_type=webhook)",{"type":47,"tag":142,"props":297,"children":298},{},[299,308],{"type":47,"tag":164,"props":300,"children":301},{},[302],{"type":47,"tag":61,"props":303,"children":305},{"className":304},[],[306],{"type":52,"value":307},"external-data-sources-create-webhook-create",{"type":47,"tag":164,"props":309,"children":310},{},[311],{"type":52,"value":312},"Register a webhook after switching a schema to sync_type=webhook",{"type":47,"tag":142,"props":314,"children":315},{},[316,325],{"type":47,"tag":164,"props":317,"children":318},{},[319],{"type":47,"tag":61,"props":320,"children":322},{"className":321},[],[323],{"type":52,"value":324},"external-data-sources-update-webhook-inputs-create",{"type":47,"tag":164,"props":326,"children":327},{},[328],{"type":52,"value":329},"Rotate a webhook signing secret",{"type":47,"tag":142,"props":331,"children":332},{},[333,342],{"type":47,"tag":164,"props":334,"children":335},{},[336],{"type":47,"tag":61,"props":337,"children":339},{"className":338},[],[340],{"type":52,"value":341},"external-data-sources-delete-webhook-create",{"type":47,"tag":164,"props":343,"children":344},{},[345],{"type":52,"value":346},"Unregister webhook when switching schemas off sync_type=webhook",{"type":47,"tag":78,"props":348,"children":350},{"id":349},"the-fields-you-can-tune",[351],{"type":52,"value":352},"The fields you can tune",{"type":47,"tag":55,"props":354,"children":355},{},[356],{"type":52,"value":357},"From the partial-update endpoint:",{"type":47,"tag":134,"props":359,"children":360},{},[361,382],{"type":47,"tag":138,"props":362,"children":363},{},[364],{"type":47,"tag":142,"props":365,"children":366},{},[367,372,377],{"type":47,"tag":146,"props":368,"children":369},{},[370],{"type":52,"value":371},"Field",{"type":47,"tag":146,"props":373,"children":374},{},[375],{"type":52,"value":376},"Values",{"type":47,"tag":146,"props":378,"children":379},{},[380],{"type":52,"value":381},"Notes",{"type":47,"tag":157,"props":383,"children":384},{},[385,440,470,531,553,593,689,715],{"type":47,"tag":142,"props":386,"children":387},{},[388,397,435],{"type":47,"tag":164,"props":389,"children":390},{},[391],{"type":47,"tag":61,"props":392,"children":394},{"className":393},[],[395],{"type":52,"value":396},"sync_type",{"type":47,"tag":164,"props":398,"children":399},{},[400,406,408,414,415,421,422,428,429],{"type":47,"tag":61,"props":401,"children":403},{"className":402},[],[404],{"type":52,"value":405},"full_refresh",{"type":52,"value":407},", ",{"type":47,"tag":61,"props":409,"children":411},{"className":410},[],[412],{"type":52,"value":413},"incremental",{"type":52,"value":407},{"type":47,"tag":61,"props":416,"children":418},{"className":417},[],[419],{"type":52,"value":420},"append",{"type":52,"value":407},{"type":47,"tag":61,"props":423,"children":425},{"className":424},[],[426],{"type":52,"value":427},"cdc",{"type":52,"value":407},{"type":47,"tag":61,"props":430,"children":432},{"className":431},[],[433],{"type":52,"value":434},"webhook",{"type":47,"tag":164,"props":436,"children":437},{},[438],{"type":52,"value":439},"Source must support the target type — check via incremental-fields",{"type":47,"tag":142,"props":441,"children":442},{},[443,452,457],{"type":47,"tag":164,"props":444,"children":445},{},[446],{"type":47,"tag":61,"props":447,"children":449},{"className":448},[],[450],{"type":52,"value":451},"incremental_field",{"type":47,"tag":164,"props":453,"children":454},{},[455],{"type":52,"value":456},"Column name from the source",{"type":47,"tag":164,"props":458,"children":459},{},[460,462,468],{"type":52,"value":461},"Must appear in ",{"type":47,"tag":61,"props":463,"children":465},{"className":464},[],[466],{"type":52,"value":467},"incremental_fields",{"type":52,"value":469}," list for the schema",{"type":47,"tag":142,"props":471,"children":472},{},[473,482,526],{"type":47,"tag":164,"props":474,"children":475},{},[476],{"type":47,"tag":61,"props":477,"children":479},{"className":478},[],[480],{"type":52,"value":481},"incremental_field_type",{"type":47,"tag":164,"props":483,"children":484},{},[485,491,492,498,499,505,506,512,513,519,520],{"type":47,"tag":61,"props":486,"children":488},{"className":487},[],[489],{"type":52,"value":490},"datetime",{"type":52,"value":407},{"type":47,"tag":61,"props":493,"children":495},{"className":494},[],[496],{"type":52,"value":497},"date",{"type":52,"value":407},{"type":47,"tag":61,"props":500,"children":502},{"className":501},[],[503],{"type":52,"value":504},"timestamp",{"type":52,"value":407},{"type":47,"tag":61,"props":507,"children":509},{"className":508},[],[510],{"type":52,"value":511},"integer",{"type":52,"value":407},{"type":47,"tag":61,"props":514,"children":516},{"className":515},[],[517],{"type":52,"value":518},"numeric",{"type":52,"value":407},{"type":47,"tag":61,"props":521,"children":523},{"className":522},[],[524],{"type":52,"value":525},"objectid",{"type":47,"tag":164,"props":527,"children":528},{},[529],{"type":52,"value":530},"Must match the column's real type",{"type":47,"tag":142,"props":532,"children":533},{},[534,543,548],{"type":47,"tag":164,"props":535,"children":536},{},[537],{"type":47,"tag":61,"props":538,"children":540},{"className":539},[],[541],{"type":52,"value":542},"primary_key_columns",{"type":47,"tag":164,"props":544,"children":545},{},[546],{"type":52,"value":547},"Array of column names",{"type":47,"tag":164,"props":549,"children":550},{},[551],{"type":52,"value":552},"Required for CDC. Used for upsert dedup on incremental",{"type":47,"tag":142,"props":554,"children":555},{},[556,565,588],{"type":47,"tag":164,"props":557,"children":558},{},[559],{"type":47,"tag":61,"props":560,"children":562},{"className":561},[],[563],{"type":52,"value":564},"cdc_table_mode",{"type":47,"tag":164,"props":566,"children":567},{},[568,574,575,581,582],{"type":47,"tag":61,"props":569,"children":571},{"className":570},[],[572],{"type":52,"value":573},"consolidated",{"type":52,"value":407},{"type":47,"tag":61,"props":576,"children":578},{"className":577},[],[579],{"type":52,"value":580},"cdc_only",{"type":52,"value":407},{"type":47,"tag":61,"props":583,"children":585},{"className":584},[],[586],{"type":52,"value":587},"both",{"type":47,"tag":164,"props":589,"children":590},{},[591],{"type":52,"value":592},"Only meaningful when sync_type=cdc",{"type":47,"tag":142,"props":594,"children":595},{},[596,605,684],{"type":47,"tag":164,"props":597,"children":598},{},[599],{"type":47,"tag":61,"props":600,"children":602},{"className":601},[],[603],{"type":52,"value":604},"sync_frequency",{"type":47,"tag":164,"props":606,"children":607},{},[608,614,615,621,622,628,629,635,636,642,643,649,650,656,657,663,664,670,671,677,678],{"type":47,"tag":61,"props":609,"children":611},{"className":610},[],[612],{"type":52,"value":613},"1min",{"type":52,"value":407},{"type":47,"tag":61,"props":616,"children":618},{"className":617},[],[619],{"type":52,"value":620},"5min",{"type":52,"value":407},{"type":47,"tag":61,"props":623,"children":625},{"className":624},[],[626],{"type":52,"value":627},"15min",{"type":52,"value":407},{"type":47,"tag":61,"props":630,"children":632},{"className":631},[],[633],{"type":52,"value":634},"30min",{"type":52,"value":407},{"type":47,"tag":61,"props":637,"children":639},{"className":638},[],[640],{"type":52,"value":641},"1hour",{"type":52,"value":407},{"type":47,"tag":61,"props":644,"children":646},{"className":645},[],[647],{"type":52,"value":648},"6hour",{"type":52,"value":407},{"type":47,"tag":61,"props":651,"children":653},{"className":652},[],[654],{"type":52,"value":655},"12hour",{"type":52,"value":407},{"type":47,"tag":61,"props":658,"children":660},{"className":659},[],[661],{"type":52,"value":662},"24hour",{"type":52,"value":407},{"type":47,"tag":61,"props":665,"children":667},{"className":666},[],[668],{"type":52,"value":669},"7day",{"type":52,"value":407},{"type":47,"tag":61,"props":672,"children":674},{"className":673},[],[675],{"type":52,"value":676},"30day",{"type":52,"value":407},{"type":47,"tag":61,"props":679,"children":681},{"className":680},[],[682],{"type":52,"value":683},"never",{"type":47,"tag":164,"props":685,"children":686},{},[687],{"type":52,"value":688},"Applies to all non-CDC types",{"type":47,"tag":142,"props":690,"children":691},{},[692,701,710],{"type":47,"tag":164,"props":693,"children":694},{},[695],{"type":47,"tag":61,"props":696,"children":698},{"className":697},[],[699],{"type":52,"value":700},"sync_time_of_day",{"type":47,"tag":164,"props":702,"children":703},{},[704],{"type":47,"tag":61,"props":705,"children":707},{"className":706},[],[708],{"type":52,"value":709},"HH:MM:SS",{"type":47,"tag":164,"props":711,"children":712},{},[713],{"type":52,"value":714},"When sync_frequency is daily\u002Fweekly-scale",{"type":47,"tag":142,"props":716,"children":717},{},[718,727,744],{"type":47,"tag":164,"props":719,"children":720},{},[721],{"type":47,"tag":61,"props":722,"children":724},{"className":723},[],[725],{"type":52,"value":726},"should_sync",{"type":47,"tag":164,"props":728,"children":729},{},[730,736,738],{"type":47,"tag":61,"props":731,"children":733},{"className":732},[],[734],{"type":52,"value":735},"true",{"type":52,"value":737}," \u002F ",{"type":47,"tag":61,"props":739,"children":741},{"className":740},[],[742],{"type":52,"value":743},"false",{"type":47,"tag":164,"props":745,"children":746},{},[747],{"type":52,"value":748},"Pause the schema without deleting it",{"type":47,"tag":78,"props":750,"children":752},{"id":751},"workflow",[753],{"type":52,"value":754},"Workflow",{"type":47,"tag":756,"props":757,"children":759},"h3",{"id":758},"step-1-read-the-current-config",[760],{"type":52,"value":761},"Step 1 — Read the current config",{"type":47,"tag":55,"props":763,"children":764},{},[765,767,773],{"type":52,"value":766},"Always start with ",{"type":47,"tag":61,"props":768,"children":770},{"className":769},[],[771],{"type":52,"value":772},"external-data-schemas-retrieve({id})",{"type":52,"value":774},". Understanding the current state prevents mistakes like\n\"fixing\" an incremental_field that's actually correct.",{"type":47,"tag":55,"props":776,"children":777},{},[778],{"type":52,"value":779},"Note:",{"type":47,"tag":85,"props":781,"children":782},{},[783,811,831,842],{"type":47,"tag":89,"props":784,"children":785},{},[786,788,793,794,799,800,805,806],{"type":52,"value":787},"Current ",{"type":47,"tag":61,"props":789,"children":791},{"className":790},[],[792],{"type":52,"value":396},{"type":52,"value":407},{"type":47,"tag":61,"props":795,"children":797},{"className":796},[],[798],{"type":52,"value":451},{"type":52,"value":407},{"type":47,"tag":61,"props":801,"children":803},{"className":802},[],[804],{"type":52,"value":481},{"type":52,"value":407},{"type":47,"tag":61,"props":807,"children":809},{"className":808},[],[810],{"type":52,"value":542},{"type":47,"tag":89,"props":812,"children":813},{},[814,815,821,823,829],{"type":52,"value":787},{"type":47,"tag":61,"props":816,"children":818},{"className":817},[],[819],{"type":52,"value":820},"status",{"type":52,"value":822}," (don't tune a schema that's currently ",{"type":47,"tag":61,"props":824,"children":826},{"className":825},[],[827],{"type":52,"value":828},"Running",{"type":52,"value":830}," — wait or cancel first)",{"type":47,"tag":89,"props":832,"children":833},{},[834,840],{"type":47,"tag":61,"props":835,"children":837},{"className":836},[],[838],{"type":52,"value":839},"last_synced_at",{"type":52,"value":841}," (so you can tell if the next sync worked)",{"type":47,"tag":89,"props":843,"children":844},{},[845,851],{"type":47,"tag":61,"props":846,"children":848},{"className":847},[],[849],{"type":52,"value":850},"latest_error",{"type":52,"value":852}," if present (the error often tells you exactly what to change)",{"type":47,"tag":756,"props":854,"children":856},{"id":855},"step-2-if-changing-sync_type-or-incremental_field-refresh-candidates",[857],{"type":52,"value":858},"Step 2 — If changing sync_type or incremental_field, refresh candidates",{"type":47,"tag":55,"props":860,"children":861},{},[862,864,870],{"type":52,"value":863},"Call ",{"type":47,"tag":61,"props":865,"children":867},{"className":866},[],[868],{"type":52,"value":869},"external-data-schemas-incremental-fields-create({id})",{"type":52,"value":871},". Even though the operation name says \"create\", it\nre-reads the source and returns the current candidate fields — use it to confirm the field you want to set actually\nexists on the source and which sync types are now available for this table.",{"type":47,"tag":55,"props":873,"children":874},{},[875],{"type":52,"value":876},"The response:",{"type":47,"tag":878,"props":879,"children":884},"pre",{"className":880,"code":882,"language":52,"meta":883},[881],"language-text","{\n  \"incremental_fields\": [{\"field\": \"updated_at\", \"type\": \"datetime\", ...}, ...],\n  \"incremental_available\": true,\n  \"append_available\": true,\n  \"cdc_available\": true,\n  \"full_refresh_available\": true,\n  \"detected_primary_keys\": [\"id\"],\n  \"available_columns\": [...]\n}\n","",[885],{"type":47,"tag":61,"props":886,"children":887},{"__ignoreMap":883},[888],{"type":52,"value":882},{"type":47,"tag":55,"props":890,"children":891},{},[892,894,899],{"type":52,"value":893},"If your target ",{"type":47,"tag":61,"props":895,"children":897},{"className":896},[],[898],{"type":52,"value":451},{"type":52,"value":900}," isn't in the list, tell the user — they need to either pick a different field or\nchange the source table to add one.",{"type":47,"tag":756,"props":902,"children":904},{"id":903},"step-3-apply-the-change",[905],{"type":52,"value":906},"Step 3 — Apply the change",{"type":47,"tag":55,"props":908,"children":909},{},[910,911,917],{"type":52,"value":863},{"type":47,"tag":61,"props":912,"children":914},{"className":913},[],[915],{"type":52,"value":916},"external-data-schemas-partial-update({id}, {...changed fields})",{"type":52,"value":918},".",{"type":47,"tag":55,"props":920,"children":921},{},[922,928],{"type":47,"tag":923,"props":924,"children":925},"strong",{},[926],{"type":52,"value":927},"Only send the fields that are actually changing.",{"type":52,"value":929}," Partial update means unspecified fields stay as they are.",{"type":47,"tag":55,"props":931,"children":932},{},[933],{"type":52,"value":934},"Examples:",{"type":47,"tag":878,"props":936,"children":940},{"className":937,"code":938,"language":939,"meta":883,"style":883},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F Switch from full_refresh to incremental\n{\n  \"sync_type\": \"incremental\",\n  \"incremental_field\": \"updated_at\",\n  \"incremental_field_type\": \"datetime\"\n}\n\n\u002F\u002F Change sync frequency to hourly\n{\"sync_frequency\": \"1hour\"}\n\n\u002F\u002F Fix wrong PK on a CDC table\n{\"primary_key_columns\": [\"tenant_id\", \"order_id\"]}\n\n\u002F\u002F Pause a schema\n{\"should_sync\": false}\n","json",[941],{"type":47,"tag":61,"props":942,"children":943},{"__ignoreMap":883},[944,956,966,1009,1046,1079,1088,1098,1107,1148,1156,1164,1229,1237,1246],{"type":47,"tag":945,"props":946,"children":949},"span",{"class":947,"line":948},"line",1,[950],{"type":47,"tag":945,"props":951,"children":953},{"style":952},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[954],{"type":52,"value":955},"\u002F\u002F Switch from full_refresh to incremental\n",{"type":47,"tag":945,"props":957,"children":959},{"class":947,"line":958},2,[960],{"type":47,"tag":945,"props":961,"children":963},{"style":962},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[964],{"type":52,"value":965},"{\n",{"type":47,"tag":945,"props":967,"children":969},{"class":947,"line":968},3,[970,975,980,985,990,995,1000,1004],{"type":47,"tag":945,"props":971,"children":972},{"style":962},[973],{"type":52,"value":974},"  \"",{"type":47,"tag":945,"props":976,"children":978},{"style":977},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[979],{"type":52,"value":396},{"type":47,"tag":945,"props":981,"children":982},{"style":962},[983],{"type":52,"value":984},"\"",{"type":47,"tag":945,"props":986,"children":987},{"style":962},[988],{"type":52,"value":989},":",{"type":47,"tag":945,"props":991,"children":992},{"style":962},[993],{"type":52,"value":994}," \"",{"type":47,"tag":945,"props":996,"children":998},{"style":997},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[999],{"type":52,"value":413},{"type":47,"tag":945,"props":1001,"children":1002},{"style":962},[1003],{"type":52,"value":984},{"type":47,"tag":945,"props":1005,"children":1006},{"style":962},[1007],{"type":52,"value":1008},",\n",{"type":47,"tag":945,"props":1010,"children":1012},{"class":947,"line":1011},4,[1013,1017,1021,1025,1029,1033,1038,1042],{"type":47,"tag":945,"props":1014,"children":1015},{"style":962},[1016],{"type":52,"value":974},{"type":47,"tag":945,"props":1018,"children":1019},{"style":977},[1020],{"type":52,"value":451},{"type":47,"tag":945,"props":1022,"children":1023},{"style":962},[1024],{"type":52,"value":984},{"type":47,"tag":945,"props":1026,"children":1027},{"style":962},[1028],{"type":52,"value":989},{"type":47,"tag":945,"props":1030,"children":1031},{"style":962},[1032],{"type":52,"value":994},{"type":47,"tag":945,"props":1034,"children":1035},{"style":997},[1036],{"type":52,"value":1037},"updated_at",{"type":47,"tag":945,"props":1039,"children":1040},{"style":962},[1041],{"type":52,"value":984},{"type":47,"tag":945,"props":1043,"children":1044},{"style":962},[1045],{"type":52,"value":1008},{"type":47,"tag":945,"props":1047,"children":1049},{"class":947,"line":1048},5,[1050,1054,1058,1062,1066,1070,1074],{"type":47,"tag":945,"props":1051,"children":1052},{"style":962},[1053],{"type":52,"value":974},{"type":47,"tag":945,"props":1055,"children":1056},{"style":977},[1057],{"type":52,"value":481},{"type":47,"tag":945,"props":1059,"children":1060},{"style":962},[1061],{"type":52,"value":984},{"type":47,"tag":945,"props":1063,"children":1064},{"style":962},[1065],{"type":52,"value":989},{"type":47,"tag":945,"props":1067,"children":1068},{"style":962},[1069],{"type":52,"value":994},{"type":47,"tag":945,"props":1071,"children":1072},{"style":997},[1073],{"type":52,"value":490},{"type":47,"tag":945,"props":1075,"children":1076},{"style":962},[1077],{"type":52,"value":1078},"\"\n",{"type":47,"tag":945,"props":1080,"children":1082},{"class":947,"line":1081},6,[1083],{"type":47,"tag":945,"props":1084,"children":1085},{"style":962},[1086],{"type":52,"value":1087},"}\n",{"type":47,"tag":945,"props":1089,"children":1091},{"class":947,"line":1090},7,[1092],{"type":47,"tag":945,"props":1093,"children":1095},{"emptyLinePlaceholder":1094},true,[1096],{"type":52,"value":1097},"\n",{"type":47,"tag":945,"props":1099,"children":1101},{"class":947,"line":1100},8,[1102],{"type":47,"tag":945,"props":1103,"children":1104},{"style":952},[1105],{"type":52,"value":1106},"\u002F\u002F Change sync frequency to hourly\n",{"type":47,"tag":945,"props":1108,"children":1110},{"class":947,"line":1109},9,[1111,1116,1120,1124,1128,1132,1136,1140,1144],{"type":47,"tag":945,"props":1112,"children":1113},{"style":962},[1114],{"type":52,"value":1115},"{",{"type":47,"tag":945,"props":1117,"children":1118},{"style":962},[1119],{"type":52,"value":984},{"type":47,"tag":945,"props":1121,"children":1122},{"style":977},[1123],{"type":52,"value":604},{"type":47,"tag":945,"props":1125,"children":1126},{"style":962},[1127],{"type":52,"value":984},{"type":47,"tag":945,"props":1129,"children":1130},{"style":962},[1131],{"type":52,"value":989},{"type":47,"tag":945,"props":1133,"children":1134},{"style":962},[1135],{"type":52,"value":994},{"type":47,"tag":945,"props":1137,"children":1138},{"style":997},[1139],{"type":52,"value":641},{"type":47,"tag":945,"props":1141,"children":1142},{"style":962},[1143],{"type":52,"value":984},{"type":47,"tag":945,"props":1145,"children":1146},{"style":962},[1147],{"type":52,"value":1087},{"type":47,"tag":945,"props":1149,"children":1151},{"class":947,"line":1150},10,[1152],{"type":47,"tag":945,"props":1153,"children":1154},{"emptyLinePlaceholder":1094},[1155],{"type":52,"value":1097},{"type":47,"tag":945,"props":1157,"children":1158},{"class":947,"line":30},[1159],{"type":47,"tag":945,"props":1160,"children":1161},{"style":952},[1162],{"type":52,"value":1163},"\u002F\u002F Fix wrong PK on a CDC table\n",{"type":47,"tag":945,"props":1165,"children":1167},{"class":947,"line":1166},12,[1168,1172,1176,1180,1184,1188,1193,1197,1202,1206,1211,1215,1220,1224],{"type":47,"tag":945,"props":1169,"children":1170},{"style":962},[1171],{"type":52,"value":1115},{"type":47,"tag":945,"props":1173,"children":1174},{"style":962},[1175],{"type":52,"value":984},{"type":47,"tag":945,"props":1177,"children":1178},{"style":977},[1179],{"type":52,"value":542},{"type":47,"tag":945,"props":1181,"children":1182},{"style":962},[1183],{"type":52,"value":984},{"type":47,"tag":945,"props":1185,"children":1186},{"style":962},[1187],{"type":52,"value":989},{"type":47,"tag":945,"props":1189,"children":1190},{"style":962},[1191],{"type":52,"value":1192}," [",{"type":47,"tag":945,"props":1194,"children":1195},{"style":962},[1196],{"type":52,"value":984},{"type":47,"tag":945,"props":1198,"children":1199},{"style":997},[1200],{"type":52,"value":1201},"tenant_id",{"type":47,"tag":945,"props":1203,"children":1204},{"style":962},[1205],{"type":52,"value":984},{"type":47,"tag":945,"props":1207,"children":1208},{"style":962},[1209],{"type":52,"value":1210},",",{"type":47,"tag":945,"props":1212,"children":1213},{"style":962},[1214],{"type":52,"value":994},{"type":47,"tag":945,"props":1216,"children":1217},{"style":997},[1218],{"type":52,"value":1219},"order_id",{"type":47,"tag":945,"props":1221,"children":1222},{"style":962},[1223],{"type":52,"value":984},{"type":47,"tag":945,"props":1225,"children":1226},{"style":962},[1227],{"type":52,"value":1228},"]}\n",{"type":47,"tag":945,"props":1230,"children":1232},{"class":947,"line":1231},13,[1233],{"type":47,"tag":945,"props":1234,"children":1235},{"emptyLinePlaceholder":1094},[1236],{"type":52,"value":1097},{"type":47,"tag":945,"props":1238,"children":1240},{"class":947,"line":1239},14,[1241],{"type":47,"tag":945,"props":1242,"children":1243},{"style":952},[1244],{"type":52,"value":1245},"\u002F\u002F Pause a schema\n",{"type":47,"tag":945,"props":1247,"children":1249},{"class":947,"line":1248},15,[1250,1254,1258,1262,1266,1270],{"type":47,"tag":945,"props":1251,"children":1252},{"style":962},[1253],{"type":52,"value":1115},{"type":47,"tag":945,"props":1255,"children":1256},{"style":962},[1257],{"type":52,"value":984},{"type":47,"tag":945,"props":1259,"children":1260},{"style":977},[1261],{"type":52,"value":726},{"type":47,"tag":945,"props":1263,"children":1264},{"style":962},[1265],{"type":52,"value":984},{"type":47,"tag":945,"props":1267,"children":1268},{"style":962},[1269],{"type":52,"value":989},{"type":47,"tag":945,"props":1271,"children":1272},{"style":962},[1273],{"type":52,"value":1274}," false}\n",{"type":47,"tag":756,"props":1276,"children":1278},{"id":1277},"step-4-decide-whether-existing-data-is-still-valid",[1279],{"type":52,"value":1280},"Step 4 — Decide whether existing data is still valid",{"type":47,"tag":55,"props":1282,"children":1283},{},[1284],{"type":52,"value":1285},"This is the step that's easy to get wrong. Some config changes invalidate the synced data; others don't.",{"type":47,"tag":55,"props":1287,"children":1288},{},[1289],{"type":47,"tag":923,"props":1290,"children":1291},{},[1292],{"type":52,"value":1293},"Changes that DON'T invalidate existing data:",{"type":47,"tag":85,"props":1295,"children":1296},{},[1297,1313,1323,1333,1359],{"type":47,"tag":89,"props":1298,"children":1299},{},[1300,1305,1306,1311],{"type":47,"tag":61,"props":1301,"children":1303},{"className":1302},[],[1304],{"type":52,"value":604},{"type":52,"value":407},{"type":47,"tag":61,"props":1307,"children":1309},{"className":1308},[],[1310],{"type":52,"value":700},{"type":52,"value":1312}," — scheduling only",{"type":47,"tag":89,"props":1314,"children":1315},{},[1316,1321],{"type":47,"tag":61,"props":1317,"children":1319},{"className":1318},[],[1320],{"type":52,"value":726},{"type":52,"value":1322}," — on\u002Foff",{"type":47,"tag":89,"props":1324,"children":1325},{},[1326,1331],{"type":47,"tag":61,"props":1327,"children":1329},{"className":1328},[],[1330],{"type":52,"value":564},{"type":52,"value":1332}," in most cases — next sync will start writing to the new shape, but historical consolidated rows\nstay valid",{"type":47,"tag":89,"props":1334,"children":1335},{},[1336,1338,1343,1345,1350,1352,1357],{"type":52,"value":1337},"Switching between ",{"type":47,"tag":61,"props":1339,"children":1341},{"className":1340},[],[1342],{"type":52,"value":413},{"type":52,"value":1344}," and ",{"type":47,"tag":61,"props":1346,"children":1348},{"className":1347},[],[1349],{"type":52,"value":405},{"type":52,"value":1351}," with the same ",{"type":47,"tag":61,"props":1353,"children":1355},{"className":1354},[],[1356],{"type":52,"value":451},{"type":52,"value":1358}," — next sync just re-runs\nfresh",{"type":47,"tag":89,"props":1360,"children":1361},{},[1362,1364,1370],{"type":52,"value":1363},"Switching to or from ",{"type":47,"tag":61,"props":1365,"children":1367},{"className":1366},[],[1368],{"type":52,"value":1369},"sync_type: \"webhook\"",{"type":52,"value":1371}," — the synced data stays valid; only the ingestion path changes.\nRemember to register or unregister the webhook (see sections below) alongside the sync_type change.",{"type":47,"tag":55,"props":1373,"children":1374},{},[1375],{"type":47,"tag":923,"props":1376,"children":1377},{},[1378],{"type":52,"value":1379},"Changes that MAY invalidate existing data and need a resync:",{"type":47,"tag":85,"props":1381,"children":1382},{},[1383,1395,1406,1425,1442],{"type":47,"tag":89,"props":1384,"children":1385},{},[1386,1388,1393],{"type":52,"value":1387},"Changing ",{"type":47,"tag":61,"props":1389,"children":1391},{"className":1390},[],[1392],{"type":52,"value":451},{"type":52,"value":1394}," to a different column — the high-water mark is from the old column and won't match.\nWithout a resync you'll miss rows that were updated between the two fields' histories.",{"type":47,"tag":89,"props":1396,"children":1397},{},[1398,1399,1404],{"type":52,"value":1387},{"type":47,"tag":61,"props":1400,"children":1402},{"className":1401},[],[1403],{"type":52,"value":542},{"type":52,"value":1405}," — existing rows may be deduplicated incorrectly against new PK definitions.",{"type":47,"tag":89,"props":1407,"children":1408},{},[1409,1411,1416,1418,1423],{"type":52,"value":1410},"Switching from ",{"type":47,"tag":61,"props":1412,"children":1414},{"className":1413},[],[1415],{"type":52,"value":405},{"type":52,"value":1417}," to ",{"type":47,"tag":61,"props":1419,"children":1421},{"className":1420},[],[1422],{"type":52,"value":420},{"type":52,"value":1424}," — the existing rows don't have the version-history shape that append\nexpects.",{"type":47,"tag":89,"props":1426,"children":1427},{},[1428,1429,1434,1435,1440],{"type":52,"value":1410},{"type":47,"tag":61,"props":1430,"children":1432},{"className":1431},[],[1433],{"type":52,"value":420},{"type":52,"value":1417},{"type":47,"tag":61,"props":1436,"children":1438},{"className":1437},[],[1439],{"type":52,"value":405},{"type":52,"value":1441}," — opposite problem; you'll end up with duplicate historical versions.",{"type":47,"tag":89,"props":1443,"children":1444},{},[1445,1447,1452],{"type":52,"value":1446},"Switching to\u002Ffrom ",{"type":47,"tag":61,"props":1448,"children":1450},{"className":1449},[],[1451],{"type":52,"value":427},{"type":52,"value":1453}," — the table shape changes fundamentally.",{"type":47,"tag":55,"props":1455,"children":1456},{},[1457],{"type":52,"value":1458},"When the change invalidates data, the clean flow is:",{"type":47,"tag":1460,"props":1461,"children":1462},"ol",{},[1463,1473,1478],{"type":47,"tag":89,"props":1464,"children":1465},{},[1466,1471],{"type":47,"tag":61,"props":1467,"children":1469},{"className":1468},[],[1470],{"type":52,"value":74},{"type":52,"value":1472}," with the new config",{"type":47,"tag":89,"props":1474,"children":1475},{},[1476],{"type":52,"value":1477},"Warn the user this is destructive",{"type":47,"tag":89,"props":1479,"children":1480},{},[1481,1486],{"type":47,"tag":61,"props":1482,"children":1484},{"className":1483},[],[1485],{"type":52,"value":239},{"type":52,"value":1487}," to wipe and re-import under the new config",{"type":47,"tag":55,"props":1489,"children":1490},{},[1491,1493,1498,1500,1505,1507,1513,1515,1521],{"type":52,"value":1492},"Or equivalently, ",{"type":47,"tag":61,"props":1494,"children":1496},{"className":1495},[],[1497],{"type":52,"value":256},{"type":52,"value":1499}," → ",{"type":47,"tag":61,"props":1501,"children":1503},{"className":1502},[],[1504],{"type":52,"value":222},{"type":52,"value":1506},". ",{"type":47,"tag":61,"props":1508,"children":1510},{"className":1509},[],[1511],{"type":52,"value":1512},"delete-data",{"type":52,"value":1514}," + ",{"type":47,"tag":61,"props":1516,"children":1518},{"className":1517},[],[1519],{"type":52,"value":1520},"reload",{"type":52,"value":1522}," is\ncleaner when the table is large and the user wants to start from zero.",{"type":47,"tag":756,"props":1524,"children":1526},{"id":1525},"step-5-trigger-and-confirm",[1527],{"type":52,"value":1528},"Step 5 — Trigger and confirm",{"type":47,"tag":55,"props":1530,"children":1531},{},[1532,1534,1540],{"type":52,"value":1533},"For non-destructive changes, call ",{"type":47,"tag":61,"props":1535,"children":1537},{"className":1536},[],[1538],{"type":52,"value":1539},"external-data-schemas-reload({id})",{"type":52,"value":1541}," to pick up the new config immediately rather\nthan waiting for the schedule.",{"type":47,"tag":55,"props":1543,"children":1544},{},[1545,1547,1552,1554,1560,1562,1568,1570,1575,1577,1582],{"type":52,"value":1546},"Wait a moment, then ",{"type":47,"tag":61,"props":1548,"children":1550},{"className":1549},[],[1551],{"type":52,"value":772},{"type":52,"value":1553}," to confirm ",{"type":47,"tag":61,"props":1555,"children":1557},{"className":1556},[],[1558],{"type":52,"value":1559},"status = Running",{"type":52,"value":1561}," then ",{"type":47,"tag":61,"props":1563,"children":1565},{"className":1564},[],[1566],{"type":52,"value":1567},"Completed",{"type":52,"value":1569},". Report\n",{"type":47,"tag":61,"props":1571,"children":1573},{"className":1572},[],[1574],{"type":52,"value":839},{"type":52,"value":1576}," and any new ",{"type":47,"tag":61,"props":1578,"children":1580},{"className":1579},[],[1581],{"type":52,"value":850},{"type":52,"value":918},{"type":47,"tag":78,"props":1584,"children":1586},{"id":1585},"specific-common-changes",[1587],{"type":52,"value":1588},"Specific common changes",{"type":47,"tag":756,"props":1590,"children":1592},{"id":1591},"switching-full_refresh-incremental",[1593],{"type":52,"value":1594},"Switching full_refresh → incremental",{"type":47,"tag":1460,"props":1596,"children":1597},{},[1598,1616,1634],{"type":47,"tag":89,"props":1599,"children":1600},{},[1601,1607,1609,1615],{"type":47,"tag":61,"props":1602,"children":1604},{"className":1603},[],[1605],{"type":52,"value":1606},"incremental-fields-create",{"type":52,"value":1608}," to confirm the desired field exists and ",{"type":47,"tag":61,"props":1610,"children":1612},{"className":1611},[],[1613],{"type":52,"value":1614},"incremental_available: true",{"type":52,"value":918},{"type":47,"tag":89,"props":1617,"children":1618},{},[1619,1625,1627,1633],{"type":47,"tag":61,"props":1620,"children":1622},{"className":1621},[],[1623],{"type":52,"value":1624},"partial-update",{"type":52,"value":1626},": ",{"type":47,"tag":61,"props":1628,"children":1630},{"className":1629},[],[1631],{"type":52,"value":1632},"{sync_type: \"incremental\", incremental_field, incremental_field_type}",{"type":52,"value":918},{"type":47,"tag":89,"props":1635,"children":1636},{},[1637],{"type":52,"value":1638},"No data wipe needed — next sync just switches strategy. If the source is growing fast, the next incremental sync\nis the cheap one.",{"type":47,"tag":756,"props":1640,"children":1642},{"id":1641},"switching-incremental-cdc-postgres-only",[1643],{"type":52,"value":1644},"Switching incremental → cdc (Postgres only)",{"type":47,"tag":1460,"props":1646,"children":1647},{},[1648,1667,1691,1707],{"type":47,"tag":89,"props":1649,"children":1650},{},[1651,1653,1658,1660,1666],{"type":52,"value":1652},"Run ",{"type":47,"tag":61,"props":1654,"children":1656},{"className":1655},[],[1657],{"type":52,"value":273},{"type":52,"value":1659}," on the parent source. Only proceed if ",{"type":47,"tag":61,"props":1661,"children":1663},{"className":1662},[],[1664],{"type":52,"value":1665},"valid: true",{"type":52,"value":918},{"type":47,"tag":89,"props":1668,"children":1669},{},[1670,1675,1676,1682,1684,1690],{"type":47,"tag":61,"props":1671,"children":1673},{"className":1672},[],[1674],{"type":52,"value":1606},{"type":52,"value":1553},{"type":47,"tag":61,"props":1677,"children":1679},{"className":1678},[],[1680],{"type":52,"value":1681},"cdc_available: true",{"type":52,"value":1683}," and see ",{"type":47,"tag":61,"props":1685,"children":1687},{"className":1686},[],[1688],{"type":52,"value":1689},"detected_primary_keys",{"type":52,"value":918},{"type":47,"tag":89,"props":1692,"children":1693},{},[1694,1699,1700,1706],{"type":47,"tag":61,"props":1695,"children":1697},{"className":1696},[],[1698],{"type":52,"value":1624},{"type":52,"value":1626},{"type":47,"tag":61,"props":1701,"children":1703},{"className":1702},[],[1704],{"type":52,"value":1705},"{sync_type: \"cdc\", primary_key_columns: [...], cdc_table_mode: \"consolidated\"}",{"type":52,"value":918},{"type":47,"tag":89,"props":1708,"children":1709},{},[1710,1715,1717,1722],{"type":47,"tag":923,"props":1711,"children":1712},{},[1713],{"type":52,"value":1714},"Resync required",{"type":52,"value":1716}," — CDC tables have a different shape. Trigger ",{"type":47,"tag":61,"props":1718,"children":1720},{"className":1719},[],[1721],{"type":52,"value":239},{"type":52,"value":1723}," after the update.\nWarn the user this wipes existing data.",{"type":47,"tag":756,"props":1725,"children":1727},{"id":1726},"fixing-a-stale-incremental-field-after-schema-drift",[1728],{"type":52,"value":1729},"Fixing a stale incremental field after schema drift",{"type":47,"tag":55,"props":1731,"children":1732},{},[1733,1735,1740],{"type":52,"value":1734},"Source dropped the ",{"type":47,"tag":61,"props":1736,"children":1738},{"className":1737},[],[1739],{"type":52,"value":1037},{"type":52,"value":1741}," column. Sync has been failing with \"column does not exist\".",{"type":47,"tag":1460,"props":1743,"children":1744},{},[1745,1755,1767,1777],{"type":47,"tag":89,"props":1746,"children":1747},{},[1748,1753],{"type":47,"tag":61,"props":1749,"children":1751},{"className":1750},[],[1752],{"type":52,"value":1606},{"type":52,"value":1754}," to see what fields remain.",{"type":47,"tag":89,"props":1756,"children":1757},{},[1758,1760,1765],{"type":52,"value":1759},"Pick a replacement (or switch to ",{"type":47,"tag":61,"props":1761,"children":1763},{"className":1762},[],[1764],{"type":52,"value":405},{"type":52,"value":1766}," if none are suitable).",{"type":47,"tag":89,"props":1768,"children":1769},{},[1770,1775],{"type":47,"tag":61,"props":1771,"children":1773},{"className":1772},[],[1774],{"type":52,"value":1624},{"type":52,"value":1776}," with the new field + type (or new sync_type).",{"type":47,"tag":89,"props":1778,"children":1779},{},[1780,1785],{"type":47,"tag":61,"props":1781,"children":1783},{"className":1782},[],[1784],{"type":52,"value":1520},{"type":52,"value":1786}," to retry.",{"type":47,"tag":756,"props":1788,"children":1790},{"id":1789},"changing-primary-keys-on-a-cdc-table",[1791],{"type":52,"value":1792},"Changing primary keys on a CDC table",{"type":47,"tag":1460,"props":1794,"children":1795},{},[1796,1812,1821],{"type":47,"tag":89,"props":1797,"children":1798},{},[1799,1804,1805,1811],{"type":47,"tag":61,"props":1800,"children":1802},{"className":1801},[],[1803],{"type":52,"value":1624},{"type":52,"value":1626},{"type":47,"tag":61,"props":1806,"children":1808},{"className":1807},[],[1809],{"type":52,"value":1810},"{primary_key_columns: [...]}",{"type":52,"value":918},{"type":47,"tag":89,"props":1813,"children":1814},{},[1815,1819],{"type":47,"tag":923,"props":1816,"children":1817},{},[1818],{"type":52,"value":1714},{"type":52,"value":1820}," — existing CDC tombstones and upsert keys won't match the new PK definition, leading to row\nduplication or missed updates.",{"type":47,"tag":89,"props":1822,"children":1823},{},[1824,1830],{"type":47,"tag":61,"props":1825,"children":1827},{"className":1826},[],[1828],{"type":52,"value":1829},"resync",{"type":52,"value":1831},", warn the user.",{"type":47,"tag":756,"props":1833,"children":1835},{"id":1834},"changing-sync_frequency",[1836],{"type":52,"value":1837},"Changing sync_frequency",{"type":47,"tag":1460,"props":1839,"children":1840},{},[1841,1857],{"type":47,"tag":89,"props":1842,"children":1843},{},[1844,1849,1850,1856],{"type":47,"tag":61,"props":1845,"children":1847},{"className":1846},[],[1848],{"type":52,"value":1624},{"type":52,"value":1626},{"type":47,"tag":61,"props":1851,"children":1853},{"className":1852},[],[1854],{"type":52,"value":1855},"{sync_frequency: \"1hour\"}",{"type":52,"value":918},{"type":47,"tag":89,"props":1858,"children":1859},{},[1860],{"type":52,"value":1861},"No reload needed — the next scheduled sync picks up the new cadence. Or reload manually if the user wants to\nconfirm nothing broke.",{"type":47,"tag":756,"props":1863,"children":1865},{"id":1864},"switching-a-schema-to-sync_type-webhook",[1866,1868],{"type":52,"value":1867},"Switching a schema to ",{"type":47,"tag":61,"props":1869,"children":1871},{"className":1870},[],[1872],{"type":52,"value":1369},{"type":47,"tag":55,"props":1874,"children":1875},{},[1876,1878,1884,1886,1892,1894,1899],{"type":52,"value":1877},"Only works for sources that implement ",{"type":47,"tag":61,"props":1879,"children":1881},{"className":1880},[],[1882],{"type":52,"value":1883},"WebhookSource",{"type":52,"value":1885}," (today: Stripe) and tables where ",{"type":47,"tag":61,"props":1887,"children":1889},{"className":1888},[],[1890],{"type":52,"value":1891},"supports_webhooks: true",{"type":52,"value":1893},"\nfrom ",{"type":47,"tag":61,"props":1895,"children":1897},{"className":1896},[],[1898],{"type":52,"value":1606},{"type":52,"value":918},{"type":47,"tag":1460,"props":1901,"children":1902},{},[1903,1919,1935,1956,1961],{"type":47,"tag":89,"props":1904,"children":1905},{},[1906,1911,1912,1917],{"type":47,"tag":61,"props":1907,"children":1909},{"className":1908},[],[1910],{"type":52,"value":1606},{"type":52,"value":1553},{"type":47,"tag":61,"props":1913,"children":1915},{"className":1914},[],[1916],{"type":52,"value":1891},{"type":52,"value":1918}," for the table.",{"type":47,"tag":89,"props":1920,"children":1921},{},[1922,1927,1928,1934],{"type":47,"tag":61,"props":1923,"children":1925},{"className":1924},[],[1926],{"type":52,"value":1624},{"type":52,"value":1626},{"type":47,"tag":61,"props":1929,"children":1931},{"className":1930},[],[1932],{"type":52,"value":1933},"{sync_type: \"webhook\"}",{"type":52,"value":918},{"type":47,"tag":89,"props":1936,"children":1937},{},[1938,1940,1946,1948,1954],{"type":52,"value":1939},"If the source doesn't already have a webhook registered (check with ",{"type":47,"tag":61,"props":1941,"children":1943},{"className":1942},[],[1944],{"type":52,"value":1945},"webhook-info-retrieve",{"type":52,"value":1947},"), call\n",{"type":47,"tag":61,"props":1949,"children":1951},{"className":1950},[],[1952],{"type":52,"value":1953},"external-data-sources-create-webhook-create({source_id})",{"type":52,"value":1955}," to register it.",{"type":47,"tag":89,"props":1957,"children":1958},{},[1959],{"type":52,"value":1960},"No resync required — the schema's existing bulk-synced data stays, and the webhook becomes the primary ingestion\npath once the next reconciliation finishes.",{"type":47,"tag":89,"props":1962,"children":1963},{},[1964,1966,1971,1973,1978],{"type":52,"value":1965},"Keep ",{"type":47,"tag":61,"props":1967,"children":1969},{"className":1968},[],[1970],{"type":52,"value":604},{"type":52,"value":1972}," set (e.g. ",{"type":47,"tag":61,"props":1974,"children":1976},{"className":1975},[],[1977],{"type":52,"value":662},{"type":52,"value":1979},") — it acts as a safety-net reconciliation in case any webhook delivery\nis missed.",{"type":47,"tag":756,"props":1981,"children":1983},{"id":1982},"switching-off-sync_type-webhook",[1984,1986],{"type":52,"value":1985},"Switching off ",{"type":47,"tag":61,"props":1987,"children":1989},{"className":1988},[],[1990],{"type":52,"value":1369},{"type":47,"tag":1460,"props":1992,"children":1993},{},[1994,2023,2050],{"type":47,"tag":89,"props":1995,"children":1996},{},[1997,2002,2003,2009,2011,2016,2017,2022],{"type":47,"tag":61,"props":1998,"children":2000},{"className":1999},[],[2001],{"type":52,"value":1624},{"type":52,"value":1626},{"type":47,"tag":61,"props":2004,"children":2006},{"className":2005},[],[2007],{"type":52,"value":2008},"{sync_type: \"incremental\"}",{"type":52,"value":2010}," (or whatever bulk type is appropriate) with the required\n",{"type":47,"tag":61,"props":2012,"children":2014},{"className":2013},[],[2015],{"type":52,"value":451},{"type":52,"value":1514},{"type":47,"tag":61,"props":2018,"children":2020},{"className":2019},[],[2021],{"type":52,"value":481},{"type":52,"value":918},{"type":47,"tag":89,"props":2024,"children":2025},{},[2026,2028,2033,2035,2040,2042,2048],{"type":52,"value":2027},"If ",{"type":47,"tag":923,"props":2029,"children":2030},{},[2031],{"type":52,"value":2032},"no other schemas",{"type":52,"value":2034}," on the source are still using ",{"type":47,"tag":61,"props":2036,"children":2038},{"className":2037},[],[2039],{"type":52,"value":1369},{"type":52,"value":2041},", call\n",{"type":47,"tag":61,"props":2043,"children":2045},{"className":2044},[],[2046],{"type":52,"value":2047},"external-data-sources-delete-webhook-create({source_id})",{"type":52,"value":2049}," to unregister. Leaving an orphaned webhook\nregistered on the source side just means events will be received and dropped — not harmful, but messy.",{"type":47,"tag":89,"props":2051,"children":2052},{},[2053],{"type":52,"value":2054},"If other schemas on the source are still on webhook, leave the webhook registered — it's shared across all\nwebhook-type schemas on the source.",{"type":47,"tag":756,"props":2056,"children":2058},{"id":2057},"rotating-a-webhook-signing-secret",[2059],{"type":52,"value":2060},"Rotating a webhook signing secret",{"type":47,"tag":55,"props":2062,"children":2063},{},[2064,2066,2072],{"type":52,"value":2065},"The source's signing secret (e.g. Stripe's ",{"type":47,"tag":61,"props":2067,"children":2069},{"className":2068},[],[2070],{"type":52,"value":2071},"whsec_...",{"type":52,"value":2073},") was rotated, and payloads are now failing signature\nverification.",{"type":47,"tag":1460,"props":2075,"children":2076},{},[2077,2082,2092],{"type":47,"tag":89,"props":2078,"children":2079},{},[2080],{"type":52,"value":2081},"Grab the new secret from the source's dashboard.",{"type":47,"tag":89,"props":2083,"children":2084},{},[2085,2091],{"type":47,"tag":61,"props":2086,"children":2088},{"className":2087},[],[2089],{"type":52,"value":2090},"external-data-sources-update-webhook-inputs-create({source_id}, {inputs: {signing_secret: \"whsec_...\"}})",{"type":52,"value":918},{"type":47,"tag":89,"props":2093,"children":2094},{},[2095],{"type":52,"value":2096},"No reload needed — the next inbound webhook payload will verify against the new secret.",{"type":47,"tag":756,"props":2098,"children":2100},{"id":2099},"pausing-a-schema",[2101],{"type":52,"value":2102},"Pausing a schema",{"type":47,"tag":1460,"props":2104,"children":2105},{},[2106,2123],{"type":47,"tag":89,"props":2107,"children":2108},{},[2109,2114,2115,2121],{"type":47,"tag":61,"props":2110,"children":2112},{"className":2111},[],[2113],{"type":52,"value":1624},{"type":52,"value":1626},{"type":47,"tag":61,"props":2116,"children":2118},{"className":2117},[],[2119],{"type":52,"value":2120},"{should_sync: false}",{"type":52,"value":2122},". Schema stops syncing but stays configured.",{"type":47,"tag":89,"props":2124,"children":2125},{},[2126,2128,2133,2134,2140,2142,2147],{"type":52,"value":2127},"To resume later: ",{"type":47,"tag":61,"props":2129,"children":2131},{"className":2130},[],[2132],{"type":52,"value":1624},{"type":52,"value":1626},{"type":47,"tag":61,"props":2135,"children":2137},{"className":2136},[],[2138],{"type":52,"value":2139},"{should_sync: true}",{"type":52,"value":2141},", then ",{"type":47,"tag":61,"props":2143,"children":2145},{"className":2144},[],[2146],{"type":52,"value":1520},{"type":52,"value":2148}," for an immediate run.",{"type":47,"tag":78,"props":2150,"children":2152},{"id":2151},"important-notes",[2153],{"type":52,"value":2154},"Important notes",{"type":47,"tag":85,"props":2156,"children":2157},{},[2158,2175,2200,2210,2236,2254,2264],{"type":47,"tag":89,"props":2159,"children":2160},{},[2161,2166,2168,2173],{"type":47,"tag":923,"props":2162,"children":2163},{},[2164],{"type":52,"value":2165},"Read before you write.",{"type":52,"value":2167}," Always retrieve the current config first. ",{"type":47,"tag":61,"props":2169,"children":2171},{"className":2170},[],[2172],{"type":52,"value":1624},{"type":52,"value":2174}," doesn't complain if you set a\nfield to the value it already had, but you might be about to change something you didn't realize was already set.",{"type":47,"tag":89,"props":2176,"children":2177},{},[2178,2183,2185,2190,2192,2198],{"type":47,"tag":923,"props":2179,"children":2180},{},[2181],{"type":52,"value":2182},"Not every sync_type is available on every schema.",{"type":52,"value":2184}," The ",{"type":47,"tag":61,"props":2186,"children":2188},{"className":2187},[],[2189],{"type":52,"value":1606},{"type":52,"value":2191}," response tells you what's\navailable ",{"type":47,"tag":2193,"props":2194,"children":2195},"em",{},[2196],{"type":52,"value":2197},"right now",{"type":52,"value":2199},", which can be different from what was available at creation (e.g. CDC may have been\nenabled for the team since).",{"type":47,"tag":89,"props":2201,"children":2202},{},[2203,2208],{"type":47,"tag":923,"props":2204,"children":2205},{},[2206],{"type":52,"value":2207},"Wipe when the shape changes.",{"type":52,"value":2209}," Switching sync strategy often changes the physical table. If you don't resync,\nyou'll be mixing row shapes and queries will return garbage.",{"type":47,"tag":89,"props":2211,"children":2212},{},[2213,2218,2220,2226,2228,2234],{"type":47,"tag":923,"props":2214,"children":2215},{},[2216],{"type":52,"value":2217},"CDC needs prerequisites.",{"type":52,"value":2219}," Never switch to ",{"type":47,"tag":61,"props":2221,"children":2223},{"className":2222},[],[2224],{"type":52,"value":2225},"sync_type: \"cdc\"",{"type":52,"value":2227}," without running ",{"type":47,"tag":61,"props":2229,"children":2231},{"className":2230},[],[2232],{"type":52,"value":2233},"check-cdc-prerequisites-create",{"type":52,"value":2235},"\nfirst. The sync will just fail immediately.",{"type":47,"tag":89,"props":2237,"children":2238},{},[2239,2244,2246,2252],{"type":47,"tag":923,"props":2240,"children":2241},{},[2242],{"type":52,"value":2243},"Don't touch a Running schema.",{"type":52,"value":2245}," If the schema is currently running, either wait for it to finish or\n",{"type":47,"tag":61,"props":2247,"children":2249},{"className":2248},[],[2250],{"type":52,"value":2251},"external-data-schemas-cancel",{"type":52,"value":2253}," before applying the change. Updating config mid-sync can leave the incremental\nhigh-water mark inconsistent.",{"type":47,"tag":89,"props":2255,"children":2256},{},[2257,2262],{"type":47,"tag":923,"props":2258,"children":2259},{},[2260],{"type":52,"value":2261},"Sync frequency is cheap to change.",{"type":52,"value":2263}," Encourage experimentation there. Sync_type and incremental_field are\nexpensive to change — encourage care.",{"type":47,"tag":89,"props":2265,"children":2266},{},[2267,2272,2274,2279],{"type":47,"tag":923,"props":2268,"children":2269},{},[2270],{"type":52,"value":2271},"Webhooks are registered at the source level, not the schema level.",{"type":52,"value":2273}," Multiple webhook-type schemas on the same\nsource share one webhook registration. Only delete the webhook when the ",{"type":47,"tag":2193,"props":2275,"children":2276},{},[2277],{"type":52,"value":2278},"last",{"type":52,"value":2280}," webhook-type schema on that\nsource is being switched away, otherwise other schemas stop receiving pushes.",{"type":47,"tag":2282,"props":2283,"children":2284},"style",{},[2285],{"type":52,"value":2286},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":2288,"total":2408},[2289,2306,2324,2341,2358,2372,2390],{"slug":2290,"name":2290,"fn":2291,"description":2292,"org":2293,"tags":2294,"stars":26,"repoUrl":27,"updatedAt":2305},"analyzing-experiment-session-replays","analyze session replays for PostHog experiments","Analyze session replay patterns across experiment variants to understand user behavior differences. Use when the user wants to see how users interact with different experiment variants, identify usability issues, compare behavior patterns between control and test groups, or get qualitative insights to complement quantitative experiment results.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2295,2298,2301,2302],{"name":2296,"slug":2297,"type":15},"Analytics","analytics",{"name":2299,"slug":2300,"type":15},"Design","design",{"name":9,"slug":8,"type":15},{"name":2303,"slug":2304,"type":15},"User Research","user-research","2026-04-06T18:44:38.291781",{"slug":2307,"name":2307,"fn":2308,"description":2309,"org":2310,"tags":2311,"stars":26,"repoUrl":27,"updatedAt":2323},"assessing-heatmaps","analyze page heatmaps and suggest improvements","Assesses what a page's heatmap is telling you and recommends concrete changes. Pulls click \u002F rageclick \u002F scroll-depth data for a URL, names the hot elements by cross-referencing autocapture events on the same page, and can create a saved heatmap the user opens in PostHog, then summarizes the behavior and proposes improvements.\nTRIGGER when: user asks what a heatmap shows, why people aren't clicking something, where users rage-click, how far they scroll, what to change on a page based on heatmap\u002Fclick data, or to 'analyze\u002Fassess\u002Freview the heatmap' for a URL.\nDO NOT TRIGGER when: the user only wants to create a saved heatmap screenshot with no analysis (use heatmaps-saved-create directly), or is asking about session replay in general (use investigating-replay).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2312,2313,2316,2317,2320],{"name":2296,"slug":2297,"type":15},{"name":2314,"slug":2315,"type":15},"Frontend","frontend",{"name":9,"slug":8,"type":15},{"name":2318,"slug":2319,"type":15},"Product Management","product-management",{"name":2321,"slug":2322,"type":15},"UX Design","ux-design","2026-06-05T07:40:43.37798",{"slug":2325,"name":2325,"fn":2326,"description":2327,"org":2328,"tags":2329,"stars":26,"repoUrl":27,"updatedAt":2340},"auditing-experiments-flags","audit PostHog experiments and feature flags","Audit PostHog experiments and feature flags for configuration issues, staleness, and best-practice violations. Read when the user asks to audit, health-check, or review experiments or feature flags, check flag hygiene, or verify experiment setup.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2330,2333,2336,2337],{"name":2331,"slug":2332,"type":15},"Audit","audit",{"name":2334,"slug":2335,"type":15},"Feature Flags","feature-flags",{"name":9,"slug":8,"type":15},{"name":2338,"slug":2339,"type":15},"QA","qa","2026-04-06T18:44:30.657553",{"slug":2342,"name":2342,"fn":2343,"description":2344,"org":2345,"tags":2346,"stars":26,"repoUrl":27,"updatedAt":2357},"authoring-scouts","author and edit PostHog Signals scouts","How to author, edit, and adapt PostHog Signals scouts — the scheduled agents that scan a project and write reports into the Signals inbox. Use when a user wants to customize a canonical scout for their own setup (narrow its scope, retune its thresholds, add disqualifiers), tweak a scout's schedule or dry-run posture, or write a brand-new scout from scratch for a specific use case (a custom event, a product surface no canonical scout covers), or steer a scout without editing it at all by leaving it a note. Covers the scout SKILL.md anatomy, the report contract, the dedupe + scratchpad-memory conventions, the scout-notes steering channel, the per-team skills-store path vs the canonical in-repo path, and the write-and-inspect test loop (with dry-run as an optional safety net). Trigger on \"write\u002Fedit\u002Fcustomize a signals scout\", \"new scout for X\", \"tune my scout schedule\", \"make a scout that watches \u003Cevent>\", \"leave a note for \u002F give feedback to a scout\", \"tell the scouts about X\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2347,2350,2353,2356],{"name":2348,"slug":2349,"type":15},"Agents","agents",{"name":2351,"slug":2352,"type":15},"Automation","automation",{"name":2354,"slug":2355,"type":15},"Observability","observability",{"name":9,"slug":8,"type":15},"2026-07-28T05:33:45.509154",{"slug":2359,"name":2359,"fn":2360,"description":2361,"org":2362,"tags":2363,"stars":26,"repoUrl":27,"updatedAt":2371},"building-a-dashboard","build and update PostHog dashboards","Build a new dashboard, or update an existing one, from a set of insights — the same job the in-app assistant does with its upsert-dashboard tool, but over MCP. Use when a user asks to create a dashboard, put several metrics\u002Fcharts together on one page, assemble a dashboard for a topic (product analytics, retention, revenue, activation, etc.), or add\u002Fremove\u002Freplace insights on a dashboard they already have. Covers deciding create vs update, reusing existing insights vs creating new ones, and using PostHog's vetted dashboard templates as reference for what a strong dashboard on a topic looks like.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2364,2365,2368],{"name":2296,"slug":2297,"type":15},{"name":2366,"slug":2367,"type":15},"Dashboards","dashboards",{"name":2369,"slug":2370,"type":15},"MCP","mcp","2026-07-21T06:07:38.060598",{"slug":2373,"name":2373,"fn":2374,"description":2375,"org":2376,"tags":2377,"stars":26,"repoUrl":27,"updatedAt":2389},"checking-deploy-timing","correlate PostHog deployments with GitHub commits","Determine when a PostHog code change reached a given environment by reading the hidden GIT deploy annotations in the project and correlating them with the merge commit on GitHub. Use when PostHog staff ask \"when was X deployed\", \"is my change live in the US\u002FEU yet\", \"has my PR shipped\", \"did the fix roll out to prod-us\", or otherwise want to know whether\u002Fwhen a commit, PR, or feature went out to a region. Do not answer deploy-timing questions from event\u002Fdata volume alone — that only shows when data changed, not when code shipped.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2378,2381,2384,2387,2388],{"name":2379,"slug":2380,"type":15},"Deployment","deployment",{"name":2382,"slug":2383,"type":15},"Git","git",{"name":2385,"slug":2386,"type":15},"GitHub","github",{"name":2354,"slug":2355,"type":15},{"name":9,"slug":8,"type":15},"2026-06-28T07:46:59.53536",{"slug":2391,"name":2391,"fn":2392,"description":2393,"org":2394,"tags":2395,"stars":26,"repoUrl":27,"updatedAt":2407},"choosing-trend-or-slope-view","visualize trends and growth over time","Clarify how to visualize change over a time range before building a trend. Use whenever the user asks how much something changed, grew, dropped, improved, or regressed between two points or periods — \"how much did X change from A to B\", \"before vs after\", \"start vs end\", \"week over week\", \"compare this month to last\", \"change over time\" — or mentions a \"slope chart\" \u002F \"slopegraph\". Two readings of \"change\" need different charts: the whole trend (a line, every interval) versus just the two endpoints (a slope, start vs end). Ask which they want, then render it. Not for choosing a saved insight ChartDisplayType in the insight editor.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2396,2397,2400,2403,2404],{"name":2296,"slug":2297,"type":15},{"name":2398,"slug":2399,"type":15},"Charts","charts",{"name":2401,"slug":2402,"type":15},"Data Visualization","data-visualization",{"name":9,"slug":8,"type":15},{"name":2405,"slug":2406,"type":15},"Reporting","reporting","2026-06-18T08:18:57.960157",56,{"items":2410,"total":2567},[2411,2426,2436,2447,2460,2475,2491,2504,2516,2531,2541,2557],{"slug":2412,"name":2412,"fn":2413,"description":2414,"org":2415,"tags":2416,"stars":2423,"repoUrl":2424,"updatedAt":2425},"analyzing-expensive-users","analyze expensive users in AI observability","Analyze the most expensive users in AI observability and explain why they cost so much. Use when the user asks about top spenders, expensive users, per-user LLM cost, user-level cost drivers, or patterns behind high AI observability spend.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2417,2418,2421,2422],{"name":2296,"slug":2297,"type":15},{"name":2419,"slug":2420,"type":15},"Cost Optimization","cost-optimization",{"name":2354,"slug":2355,"type":15},{"name":9,"slug":8,"type":15},35568,"https:\u002F\u002Fgithub.com\u002FPostHog\u002Fposthog","2026-07-28T05:34:11.117757",{"slug":2427,"name":2427,"fn":2428,"description":2429,"org":2430,"tags":2431,"stars":2423,"repoUrl":2424,"updatedAt":2435},"auditing-endpoints","audit PostHog project endpoints","Audit every endpoint in a PostHog project for staleness, failed materialisations, and unused materialised versions. Use when the user asks \"what endpoints can I clean up?\", \"are any of my endpoints broken?\", \"which materialised versions are still being called?\", or wants a one-shot cleanup pass over the Endpoints product. Produces a prioritised report grouped by issue type, with recommended actions but does not modify anything without explicit confirmation.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2432,2433,2434],{"name":2296,"slug":2297,"type":15},{"name":2331,"slug":2332,"type":15},{"name":9,"slug":8,"type":15},"2026-06-08T08:08:33.693989",{"slug":2437,"name":2437,"fn":2438,"description":2439,"org":2440,"tags":2441,"stars":2423,"repoUrl":2424,"updatedAt":2446},"auditing-warehouse-source-health","audit PostHog data warehouse source health","Audit the health of a PostHog project's data warehouse sources and syncs — find every broken or degraded source connection, sync schema, and webhook channel. Use when the user asks \"why are my imports failing?\", \"what's broken with my sources?\", \"why is my warehouse data stale?\", or wants a one-shot triage of source\u002Fsync health before deciding where to dig in. Produces a prioritized report grouped by severity, with recommended next steps. For materialized-view health use `auditing-warehouse-view-health`; for a single failing sync use `diagnosing-failed-warehouse-syncs`.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2442,2443,2444,2445],{"name":2331,"slug":2332,"type":15},{"name":21,"slug":22,"type":15},{"name":2354,"slug":2355,"type":15},{"name":9,"slug":8,"type":15},"2026-06-18T08:22:57.67984",{"slug":2448,"name":2448,"fn":2449,"description":2450,"org":2451,"tags":2452,"stars":2423,"repoUrl":2424,"updatedAt":2459},"auditing-warehouse-view-health","audit PostHog materialized view health","Audit the health of a PostHog project's materialized views (saved queries) — find every failed materialization and flag unused or stale materialized views that cost storage and compute. Use when the user asks \"which of my views are broken?\", \"why is this materialized view failing?\", \"are any of my views wasting compute?\", or wants a one-shot triage of view health. For source\u002Fsync health use `auditing-warehouse-source-health`.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2453,2454,2455,2458],{"name":2331,"slug":2332,"type":15},{"name":21,"slug":22,"type":15},{"name":2456,"slug":2457,"type":15},"Performance","performance",{"name":9,"slug":8,"type":15},"2026-06-18T08:25:10.936787",{"slug":2461,"name":2461,"fn":2462,"description":2463,"org":2464,"tags":2465,"stars":2423,"repoUrl":2424,"updatedAt":2474},"authoring-error-tracking-alerts","author PostHog error tracking alerts","Author error tracking alerts that fire when an issue is created, reopened, or starts spiking. Use when the user asks to set up error notifications, route exceptions to Slack\u002Fwebhook\u002FLinear, or evaluate which error events are worth alerting on. Covers trigger-event selection, integration choice, dedup against existing alerts, and shipping with the canonical message body shape.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2466,2469,2472,2473],{"name":2467,"slug":2468,"type":15},"Alerting","alerting",{"name":2470,"slug":2471,"type":15},"Debugging","debugging",{"name":2354,"slug":2355,"type":15},{"name":9,"slug":8,"type":15},"2026-06-18T08:24:40.318583",{"slug":2476,"name":2476,"fn":2477,"description":2478,"org":2479,"tags":2480,"stars":2423,"repoUrl":2424,"updatedAt":2490},"authoring-log-alerts","author log alerts in PostHog","Author useful, low-noise log alerts on services in a PostHog project. Use when the user asks to set up alerts for their logs, suggest alerts they should add, or evaluate whether a service is worth monitoring. Covers service triage, baseline characterisation, threshold drafting, back-testing via simulate, and shipping with a notification destination.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2481,2482,2485,2486,2489],{"name":2296,"slug":2297,"type":15},{"name":2483,"slug":2484,"type":15},"Monitoring","monitoring",{"name":2354,"slug":2355,"type":15},{"name":2487,"slug":2488,"type":15},"Operations","operations",{"name":9,"slug":8,"type":15},"2026-07-18T05:10:54.430898",{"slug":2492,"name":2492,"fn":2493,"description":2494,"org":2495,"tags":2496,"stars":2423,"repoUrl":2424,"updatedAt":2503},"building-workflows","build and edit PostHog workflows","Build, edit, test, enable, and monitor PostHog workflows over MCP. Author the action\u002Fedge graph so it runs and opens cleanly in the visual editor, then change drafts surgically with patch operations. Use when asked to build, set up, automate, change, fix, or debug a workflow, campaign, broadcast, drip sequence, or event-triggered automation in the workflows product.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2497,2498,2499,2500],{"name":2351,"slug":2352,"type":15},{"name":2369,"slug":2370,"type":15},{"name":9,"slug":8,"type":15},{"name":2501,"slug":2502,"type":15},"Workflow Automation","workflow-automation","2026-07-28T05:34:12.167015",{"slug":2505,"name":2505,"fn":2506,"description":2507,"org":2508,"tags":2509,"stars":2423,"repoUrl":2424,"updatedAt":2515},"check-posthog-loading","inspect PostHog SDK loading across URLs","Inspect how the PostHog JavaScript SDK is loaded across a list of URLs. Use to confirm consistent installation across pages, find pages missing the snippet, detect mismatched API keys or hosts between pages, and verify the load method (head snippet vs deferred vs array.js).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2510,2511,2512,2513,2514],{"name":2296,"slug":2297,"type":15},{"name":2470,"slug":2471,"type":15},{"name":2314,"slug":2315,"type":15},{"name":2354,"slug":2355,"type":15},{"name":9,"slug":8,"type":15},"2026-05-07T05:56:19.828048",{"slug":2517,"name":2517,"fn":2518,"description":2519,"org":2520,"tags":2521,"stars":2423,"repoUrl":2424,"updatedAt":2530},"consuming-endpoints-from-client-code","integrate PostHog endpoints into client applications","Wire a PostHog endpoint into a client app or SDK. Covers fetching the OpenAPI spec, generating a typed client with openapi-generator or @hey-api\u002Fopenapi-ts, sending the right auth header, shaping the variables payload (HogQL code_name vs insight breakdown property), handling rate-limit and materialised-endpoint error responses. Use when the user says \"how do I call my endpoint\", \"generate a client for this\", or \"what auth header do I use\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2522,2525,2526,2527],{"name":2523,"slug":2524,"type":15},"API Development","api-development",{"name":2314,"slug":2315,"type":15},{"name":9,"slug":8,"type":15},{"name":2528,"slug":2529,"type":15},"SDK","sdk","2026-06-08T08:08:34.929454",{"slug":2532,"name":2532,"fn":2533,"description":2534,"org":2535,"tags":2536,"stars":2423,"repoUrl":2424,"updatedAt":2540},"copying-endpoints-across-projects","copy PostHog endpoints across projects","Copy a PostHog endpoint (a saved HogQL\u002Finsight query exposed as an API route) to another project in the same organization, or duplicate it under a new name in the same project. Use when the user wants to duplicate an endpoint, promote an endpoint from staging to production, replicate an endpoint's query\u002Fvariables\u002Ffreshness config in another workspace, or clone an endpoint to iterate on it. Unlike feature flags and experiments, endpoints have NO native cross-project copy tool — this skill covers the read-then-recreate flow (endpoint-get then endpoint-create), the active-project switching it requires, name-collision checks, and the safe defaults (land unmaterialised in the target, verify with endpoint-run). Does not cover editing endpoint versions (see managing-endpoint-versions) or authoring a brand-new endpoint from scratch (see creating-an-endpoint).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2537,2538,2539],{"name":2523,"slug":2524,"type":15},{"name":2487,"slug":2488,"type":15},{"name":9,"slug":8,"type":15},"2026-07-15T05:29:58.442727",{"slug":2542,"name":2542,"fn":2543,"description":2544,"org":2545,"tags":2546,"stars":2423,"repoUrl":2424,"updatedAt":2556},"creating-ai-subscription","schedule recurring AI-generated PostHog reports","Create a recurring AI-generated PostHog report — schedule a free-text prompt to run on a cron, with the LLM-synthesized markdown delivered to email or Slack on each tick. Use when the user wants a recurring AI summary of X on any cadence (daily, weekly, monthly, yearly) rather than a one-off report. (To attach an AI summary to an existing insight\u002Fdashboard subscription instead of a free-text prompt, see `managing-subscriptions` and its `summary_enabled` option.)\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2547,2548,2551,2552,2553],{"name":2351,"slug":2352,"type":15},{"name":2549,"slug":2550,"type":15},"Email","email",{"name":9,"slug":8,"type":15},{"name":2405,"slug":2406,"type":15},{"name":2554,"slug":2555,"type":15},"Slack","slack","2026-06-09T07:32:27.935712",{"slug":2558,"name":2558,"fn":2559,"description":2560,"org":2561,"tags":2562,"stars":2423,"repoUrl":2424,"updatedAt":2566},"creating-an-endpoint","create PostHog API endpoints","Create a PostHog endpoint with the right shape on the first try — covers query kind choice, name conventions, what to expose as variables (HogQL code_name vs insight breakdown), data_freshness_seconds, and whether to materialise on day one. Use when the user says \"create an endpoint\", \"expose this query as an API\", \"turn this insight into an endpoint\", or asks for help structuring a new endpoint. Steers away from common mistakes: materialising a query with cohort breakdowns or compare mode, inline-only variables on a materialised endpoint, unbounded date ranges, ambiguous names.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2563,2564,2565],{"name":2296,"slug":2297,"type":15},{"name":2523,"slug":2524,"type":15},{"name":9,"slug":8,"type":15},"2026-06-08T08:08:29.624498",231]