GroupBy Quarter granularity


i would like you group the data by quarter. below is the code i’ve written and i’m getting error



"type": "extraction", "dimension": "__time", "outputName": "Year", "extractionFn": { "format": "Y QQ", "locale": "en-US", "timeZone": "Etc/UTC", "granularity": "Quarter", "type": "timeFormat" }


"500 - {\"error\":\"Unknown exception\",\"errorMessage\":\"Instantiation of [simple type, class io.druid.query.extraction.TimeFormatExtractionFn] value failed: Illegal pattern component: QQ (through reference chain: java.util.ArrayList[3])\",\"errorClass\":\"com.fasterxml.jackson.databind.JsonMappingException\",\"host\":null}"

Thanks in advance

The formatter used by time format extraction function does not specifying quarter.
See for supported format.

If you change format to have “MM” (month) instead of “QQ” It will still truncate the timestamp based on quarter granularity just the results will have starting month of quarter instead of quarter number.