Slackbot
12/26/2022, 11:33 AMVadim
12/26/2022, 7:29 PMCOUNT, SUM, MAX etc, Druid supports really fancy sketch based aggregations that let you do things like compute (approximate) uniques and quantiles and much more very quickly (as Sergio noted).
(2) In Druid it is also common (but not required!) to aggregate or "rollup" your data at ingest time so that the data in Druid is partially aggregated already. (see https://druid.apache.org/docs/latest/tutorials/tutorial-rollup.html).
(3) When reading about aggregation in Druid keep in mind that as well as SQL Druid also has a JSON based language for expressing queries and ingestion jobs (you will see it in the docs). In the JSON based language "aggregates" are called "metrics" and a metric spec like { "type": "count", "name": "cnt" } means the same COUNT(*) AS "cnt" in SQL. The good news is that as of Druid 24.0 it is possible to do both ingestion and querying via SQL so you could avoid needing to interact with the JSON based form.