Slackbot
02/08/2023, 3:17 AMJohn Kowtko
02/08/2023, 3:25 AMtilak chowdary
02/08/2023, 3:28 AMREPLACE INTO test_view OVERWRITE WHERE __time >= TIMESTAMP '2023-02-07 11:25:00' AND __time < TIMESTAMP '2023-02-07 11:30:00'
select max(__time) __time,
traceId,
ARRAY_AGG(DISTINCT tags, 10000) AS tags,
sum(duration) AS duration,
sum (count) AS count
from test_view
WHERE __time >= TIMESTAMP '2023-02-07 11:25:00' AND __time < TIMESTAMP '2023-02-07 11:30:00'
GROUP BY traceId
PARTITIONED BY TIME_FLOOR(__time, 'PT5M')John Kowtko
02/08/2023, 3:41 AMtilak chowdary
02/08/2023, 3:42 AMJohn Kowtko
02/08/2023, 3:43 AMtilak chowdary
02/08/2023, 3:46 AMJohn Kowtko
02/08/2023, 3:50 AMJohn Kowtko
02/08/2023, 3:51 AMJohn Kowtko
02/08/2023, 3:51 AMJohn Kowtko
02/08/2023, 3:55 AMtilak chowdary
02/08/2023, 3:58 AMtilak chowdary
02/08/2023, 3:59 AMJohn Kowtko
02/08/2023, 4:02 AMtilak chowdary
02/08/2023, 4:06 AMtilak chowdary
02/08/2023, 4:07 AMJohn Kowtko
02/08/2023, 4:11 AMVijay Narayanan
02/08/2023, 4:27 AMVijay Narayanan
02/08/2023, 4:28 AMtilak chowdary
02/08/2023, 4:33 AMVijay Narayanan
02/08/2023, 4:44 AMVijay Narayanan
02/08/2023, 4:45 AMVijay Narayanan
02/08/2023, 5:20 AMVadim
02/08/2023, 5:55 AMINSERT INTO tbl <your query> should behave the same no matter what you put in <your query>. So how does Druid SQL based ingestion know is you want rollup metadata written to your new segments? It does it by the logic of write rollup metadata is the query is INSERT or REPLACE, and the outer SELECT contains a GROUP BY clause, and finalizeAggregations is false . So even though you have nothing to finalize (you are only doing SUM and finalization is for sketches) you still need to set it explicitly to false if you want to have the rollup metadata written out.Vadim
02/08/2023, 5:56 AMVadim
02/08/2023, 5:57 AMFinalize aggregations on auto then it will be set to false every time you do an INSERT or REPLACE, but if you are using the API yourself then you have to set it to false explicitly.tilak chowdary
02/08/2023, 6:01 AM