---
title: "Why Flock Safety turned to ClickHouse for real-time vehicle traffic analytics"
description: "Flock Safety replaced a once-daily Redshift, DBT, Prefect and QuickSight SPICE pipeline with ClickHouse Cloud."
url: "https://swe.quest/articles/why-flock-safety-turned-to-clickhouse-for-real-time-vehicle-traffic-analytics-f35b2dcb28006f8a"
canonical: "https://clickhouse.com/blog/why-flock-safety-turned-to-clickhouse"
source: "ClickHouse"
published: "2025-04-29"
difficulty: "medium"
kind: "Case study"
reading_minutes: 5
tags: ["analytics","data-pipelines","cloud"]
---

# Why Flock Safety turned to ClickHouse for real-time vehicle traffic analytics

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2025-04-29, 5 min read, Case study. Original: [https://clickhouse.com/blog/why-flock-safety-turned-to-clickhouse](https://clickhouse.com/blog/why-flock-safety-turned-to-clickhouse)

## Summary

Flock Safety replaced a once-daily Redshift, DBT, Prefect and QuickSight SPICE pipeline with ClickHouse Cloud. The old setup had refreshes of up to four hours during which data was unavailable, and SPICE capped datasets at 1TB or 1 billion rows. Before choosing ClickHouse, the team found direct Redshift queries hit concurrency limits, and both Aurora PostgreSQL and S3 with Trino exceeded QuickSight's query timeouts. The new design ingests ML predictions via SNS, Firehose, S3 and ClickPipes (peaking above 20 MB/s, over 1 billion predictions a day) and uses materialized views with uniqState into AggregatingMergeTree tables, so transformation happens on insert and DBT and Prefect are no longer needed. QuickSight now queries ClickHouse directly, with queries finishing in under five seconds, no downtime and longer retention.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [Data pipelines](https://swe.quest/tags/data-pipelines.md) (Data & databases)
- [Cloud platforms](https://swe.quest/tags/cloud.md) (Infrastructure)

## Prerequisites

- OLAP databases ([easy posts on Analytics & OLAP](https://swe.quest/tags/analytics.md?difficulty=easy))
- materialized views
- AWS data services ([easy posts on Cloud platforms](https://swe.quest/tags/cloud.md?difficulty=easy))

## Keywords

ClickHouse, AggregatingMergeTree, ClickPipes, Amazon Redshift, Amazon QuickSight, Trino, Aurora PostgreSQL, Debezium

## Related posts

- [Data Hive: The story of beehiiv’s journey from Postgres to ClickHouse](https://swe.quest/articles/data-hive-the-story-of-beehiiv-s-journey-from-postgres-to-clickhouse-467867cb2bebb87b.md): ClickHouse · 2024-08-21 · Easy · 6 min read · Analytics & OLAP, Databases, PostgreSQL, Stream processing, Queues & messaging
  beehiiv replaced its Postgres-and-Ruby-queue analytics system, which struggled with billions of email events and had multi-hour reporting delays, with a Kafka-fed ClickHouse Cloud pipeline.
- [98% faster queries, 50% lower cloud costs: Verihubs’ journey from Postgres to ClickHouse](https://swe.quest/articles/98-faster-queries-50-lower-cloud-costs-verihubs-journey-from-postgres-to-f6535061aff525b1.md): ClickHouse · 2026-07-06 · Medium · 6 min read · Analytics & OLAP, Data pipelines, PostgreSQL, Event-driven architecture
  Verihubs replaced a Postgres warehouse fed by daily Airflow batch pulls with a ClickHouse-based real-time OLAP stack.
- [Appcues delivers personalized customer engagement with ClickHouse Cloud](https://swe.quest/articles/appcues-delivers-personalized-customer-engagement-with-clickhouse-cloud-70117f941c9e140c.md): ClickHouse · 2026-06-18 · Medium · 8 min read · Analytics & OLAP, Databases, Performance engineering, Cost optimization
  Appcues moved its customer-facing product analytics and segmentation from Snowflake plus Airflow rollups to ClickHouse Cloud, covering 1.31 PB of data and over 1 billion user profiles.
- [How ClickHouse Cloud enabled LaunchDarkly to build and ship features faster](https://swe.quest/articles/how-clickhouse-cloud-enabled-launchdarkly-to-build-and-ship-features-faster-0e4ac03aed14f7e6.md): ClickHouse · 2026-01-22 · Medium · 10 min read · Analytics & OLAP, Data pipelines, Observability, Multi-tenancy, Cloud platforms
  LaunchDarkly replaced Kinesis/Flink/Lambda streaming pipelines and an S3/Parquet/Athena batch warehouse with ClickHouse Cloud.
- [How Lyft powers batch and real-time analytics with ClickHouse Cloud](https://swe.quest/articles/how-lyft-powers-batch-and-real-time-analytics-with-clickhouse-cloud-f74360c81abeeaab.md): ClickHouse · 2025-09-10 · Medium · 6 min read · Analytics & OLAP, Data pipelines, Stream processing, Databases
  Lyft replaced Apache Druid with ClickHouse, first self-managed and then on ClickHouse Cloud, for analytics that read over 450 TB and write about 4 TB per day at hundreds to thousands of queries per second.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
