CDC & lakehouse sync
Sync committed changes to your warehouse without polling or superuser keys.
Schema notify rules send a signed wake-up ping whenever rows change, and a read-only service key pulls only the rows its access policy allows. Built-in cron jobs roll up tables and compact Parquet files in object storage.
Read the warehouse sync guide- Replaces
- Debezium or Kafka Connect
- Fivetran polling connectors
- Managed CDC slot plumbing
- Custom backfill and gap scripts
Webhook wake-ups
A notify rule wakes your sync worker whenever rows commit.
Create a read-only service key, allowlist your receiver host and subscribe to a schema notify event. Matching commits send a signed ping with the new commit position, so workers never poll.
Warehouse syncnapalm keys create shop --label warehouse-sync --read-onlynapalm webhooks hosts shop --add hooks.example.comnapalm webhooks add shop https://hooks.example.com/napalm \ --event order_changedSignature checks
readDelivery verifies the signature and hands back the commit position.
Check Napalm-Signature against the raw request bytes in constant time and pass delivery.position as reach on your next read. Your sync worker waits for that commit before reading and never misses the write that triggered the ping.
import { readDelivery } from 'napalm-client' export async function POST(request: Request) { const raw = await request.arrayBuffer() const delivery = await readDelivery(raw, request.headers, secret) if (delivery.kind === 'ping') await queue.add(delivery.position) return new Response(null, { status: 204 })}Change log access
Read policies filter every batch pulled from the change log.
GET /changes checks your schema’s select policies for the caller’s service key on every row. Restricted tenants and private records never enter your warehouse sync.
type Order { required tenant: Org; required total_cents: int64; access policy sync_can_read allow select using (global role ?= 'warehouse'); notify order_changed after insert, update, delete;}Saved cursors
Sync jobs pick up from the last position and flag expired windows.
napalm.changes pages forward from your stored cursor up to the webhook’s commit position. If a worker stays offline longer than your log retention, isGap tells the job to run a fresh table copy.
Following changes and gapsfor await (const page of napalm.changes({ types: ['Order'], after: cursor, reach: position,})) { for (const item of page.items) { if (isGap(item)) await copyOrders() else await warehouse.apply(item.rows) } if (page.next) cursor = await saveCursor(page.next)}Cron compactions
Built-in schedules run hourly rollups and nightly Parquet exports.
Run deployed queries or actions on a cron expression in any IANA time zone under a dedicated service key to aggregate metrics and compact Parquet files in object storage.
napalm schedules add shop compactDailyLedger '5 0 * * *' \ --time-zone UTC --key $WAREHOUSE_KEY_IDLog retention
Every branch keeps 30 days of change history by default.
Extend a branch’s change-log window up to 7 years when audit or analytics pipelines need longer replay history. Paused workers resume cleanly without missing events.
30 daysincluded change-log history on every branch