ClickPipes와 Materialized View로 구현하는 실시간 데이터 변환과 평탄화 기반 분석 실현

실시간 분석 파이프라인은 흔히 Kafka → Spark Streaming → 데이터 웨어하우스로 구성되지만, 24/7 운영되는 스트리밍 잡은 클러스터 튜닝·상태 관리·모니터링 부담과 함께 비용이 빠르게 누적됩니다. 이 세션에서는 ClickHouse Cloud의 ClickPipes와 Materialized View 조합으로 같은 ETL을 더 단순하고 비용 효율적으로 구현하는 방법을 다룹니다.

핵심은 Transform & Explode 패턴입니다. 중첩 JSON 이벤트가 수집 단계(ClickPipes)에서 타임스탬프 파싱·타임존 변환·NULL 정리로 변환(Transform) 되고, Materialized View의 ARRAY JOIN으로 배열이 개별 행으로 평탄화(Explode) 되어 곧바로 분석 가능한 fact 테이블이 되는 흐름을 설명합니다. 또한 변환 로직을 어디에 둘지(ClickPipes vs MV)에 따른 벤치마크 비교, Spark 함수의 ClickHouse 네이티브 함수 1:1 매핑, 예상 비용 절감 효과를 공유합니다. 마지막으로 주문 이벤트가 실시간으로 평탄화되어 집계되는 과정도 시연합니다.


Real-time analytics pipelines are typically built as Kafka → Spark Streaming → data warehouse, but always-on streaming jobs carry the burden of cluster tuning, state management, and monitoring—and the cost adds up fast. This session shows how to implement the same ETL more simply and cost-effectively using ClickHouse Cloud's ClickPipes and Materialized Views.

At the center is the Transform & Explode pattern: nested JSON events are transformed at ingestion time in ClickPipes (timestamp parsing, timezone conversion, NULL cleanup), then exploded—flattened from arrays into rows—by a Materialized View's ARRAY JOIN, producing a query-ready fact table. We'll also compare benchmarks for where to place transformation logic (ClickPipes vs MV), map common Spark functions to their ClickHouse-native equivalents, and review the expected cost savings. The talk closes with a demo showing order events being flattened into analytics in real time.

Hosted by

이기훈 Ken Lee

이기훈 Ken Lee

솔루션즈 아키텍트 Solution Architect, ClickHouse

Loading form...

Upcoming events