Skip to content

API Sync

chkit API sync runs finite pulls from application APIs, loads rows into schema-managed ClickHouse tables, and records progress after writes succeed.

Start with API → reader → raw table → SQL view when the final shape may change. For an established schema, map records in the reader and load typed tables. A loader writes the rows; a checkpoint records where the next execution should resume.

  • A stream owns a stable ID, destination, reader, and incremental strategy.
  • A pipeline groups streams, tags, concurrency limits, and retry defaults. It has no durable state and does not order dependent streams.
  • A run executes a selection of streams once. Cron, CI, or another scheduler starts the next run.

Use TypeScript and a direct clickhouse connection, including for ObsessionDB databases. The workbench executor does not support API sync. Create destination tables through schema migrations; ingestion creates its journal and writes data.