Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Windowed aggregations: calculate daily aggregates based on time zones other than UTC #1968
Per StackOverflow question, if calculating aggregates with KSQL at day-level and above (day/week/month/etc) it would be useful to be able to do these based on the local timezone.
KSQL windows are based on the epoch (number of milliseconds since Jan 01 1970, UTC).
For aggregates at a second/minute/hour level this doesn't really matter, but for an organisation wanting to report on "yesterday" etc then the window would need to include events within the 24 hour time window based on the specified timezone, not necessarily UTC.
One idea is if KSQL supported a
That's super hacky and I would not recommend it. Why not just work on https://issues.apache.org/jira/browse/KAFKA-7911 directly? Also note, that there is https://github.com/confluentinc/kafka-streams-examples/blob/5.3.1-post/src/test/java/io/confluent/examples/streams/window/DailyTimeWindows.java that we could leverage.