David (mailix)
06/24/2026, 9:21 AMSubhradeep Chakraborty
06/24/2026, 9:40 AMmax(_timestamp) as _timestamp) in the select clause in the pipeline query. Because if the _timestamp is not selected, o2 will add a _timestamp with the epoch of processing timestamp and not the timestamp the data is from.David (mailix)
06/24/2026, 9:44 AMSubhradeep Chakraborty
06/24/2026, 10:08 AMhistogram(_timestamp,..) as _timestamp will not work as expected because, the histogram returns the timestamp in human readable string (not epoch microseconds). Hence, o2 will replace the _timestamp with current timestamp. You can try something like -
SELECT
max(_timestamp) AS _timestamp,
account,
COUNT(*) AS request_count,
SUM(bytes_sent) AS bytes_sent_total
FROM "cdn"
WHERE account IS NOT NULL
AND account != ''
GROUP BY
1, 2, histogram(_timestamp, '1 hour')
ORDER BY
1 ASCSubhradeep Chakraborty
06/24/2026, 10:08 AMDavid (mailix)
06/25/2026, 10:45 AMSELECT
MAX(bucket_timestamp) AS _timestamp,
account,
COUNT(*) AS request_count,
SUM(bytes_sent) AS bytes_sent_total
FROM (
SELECT
CAST(FLOOR(_timestamp / 3600000000) AS BIGINT) * 3600000000 AS bucket_timestamp,
account,
bytes_sent
FROM "cdn"
WHERE account IS NOT NULL
AND account != ''
) t
GROUP BY
bucket_timestamp,
account
ORDER BY
bucket_timestamp ASC
But still no backfill working. the server logs suggest everything is working but it simply does not write the rows. Any more ideas?David (mailix)
06/25/2026, 11:06 AMSubhradeep Chakraborty
06/25/2026, 11:39 AM