Trying to understand how ksqldb relates to pinot. ...
# general
f
Trying to understand how ksqldb relates to pinot. Imagine we have 3 databases, which we turn into streams with cdc. We need to perform an aggregation in the stream, e.g. from table1 to table2. ksqldb allows you to create a new stream from the two streams and do queries on that. This also seems possible in pinot. What are advantages or disadvantages of both?
I found this https://www.reddit.com/r/apachekafka/comments/uz13wu/ksql_versus_apache_pinot/ , which highlights that its more about the nature of the query.
I’d say Pinot is ideal for user facing analytics where an analyst or regular schmo spends time in a UI slicing and dicing data. KsqlDB is more ideal for stream processing, ETL, or simple lookups of state stores (again, not ad-hoc).
The post is from 2022. Is this still the case in 2024?
m
Yes, still the case
k
the advantage of Pinot is that in most cases, you dont need to aggregate table 1 into table 2 to aggregate. You can stream the raw stream into Pinot. some level of aggregation can happen in Pinot while ingesting if needed. Note that there might be valid cases where you need intermediate ksql/flink to preprocess the stream.
h
Hi Floris. I'd love to add my input here too along with @Kishore G and @Mayank In short, ksqlDB is a streaming database and Pinot is a realtime OLAP database. ksqlDB is good for small queries because it's backed by a key/value store (rocksdb). Pinot is a columnar store optimized for lowest latency realtime queries with historical context. Use ksqlDB to enrich data in realtime, and use Pinot to serve those analytics. You don't want to invoke analytical queries on a key/value store. I hope this helps.
🙏 1
f
Thanks, this clarifies alot.