Loading…
Unordered mode for GCS ClickPipes is now available
Marta Paes
- Source
- Clickhouse
- Published
- Added to Yomu
Summary
ClickHouse Cloud has added unordered mode to its Google Cloud Storage (GCS) ClickPipes connector, enabling continuous data ingestion regardless of file naming or arrival sequence. Standard GCS ClickPipes rely on polling every 30 seconds and require files to arrive in strict lexicographical order, which causes out-of-order data and backfills to be ignored. Unordered mode replaces polling by consuming OBJECT_FINALIZE notifications from Google Cloud Pub/Sub whenever objects land in a bucket. State tracking is managed through a metadata store, and the connector automatically reprocesses batches upon failure while maintaining exactly-once insertion guarantees. Setup requires configuring a Pub/Sub topic and bucket notifications via tools like gcloud, followed by configuring the ClickPipe via the console or Terraform provider.
Context
By default, GCS ClickPipes poll buckets every 30 seconds and assume files arrive in sequential lexicographical order. Consequently, files that are lexically smaller than the last ingested file—such as backfills, retries, or late-arriving data—are ignored.
Approach / What changed
Unordered mode utilizes Google Cloud Pub/Sub notifications triggered by OBJECT_FINALIZE events from the GCS bucket. ClickPipes listens to the Pub/Sub subscription, tracks state using a metadata store, handles failures with automatic batch retries, and delivers exactly-once semantics into target ClickHouse Cloud tables.
Takeaways
- Default GCS ClickPipes poll every 30 seconds and drop files that are not lexically greater than previously processed files.
- Unordered mode relies on GCS bucket notifications publishing OBJECT_FINALIZE events to a Google Cloud Pub/Sub topic.
- The connector uses a metadata store to track file state, automatically retries failed batches, and guarantees exactly-once insertion.