This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-10-23
Channels
- # beginners (22)
- # cider (6)
- # clara (1)
- # cljs-dev (77)
- # clojure (23)
- # clojure-austin (5)
- # clojure-dusseldorf (1)
- # clojure-france (16)
- # clojure-nl (1)
- # clojure-poland (1)
- # clojure-russia (26)
- # clojure-spec (5)
- # clojurescript (120)
- # datomic (1)
- # events (1)
- # hoplon (158)
- # leiningen (5)
- # off-topic (2)
- # om (24)
- # onyx (19)
- # other-languages (1)
- # ring-swagger (4)
- # sql (1)
- # vim (1)
I think the cheat sheet might be wrong regarding :window/session-key
.
>This key can represent any totally ordered domain, e.g. :event-time
but it's supposed to be the key the session belongs to, not the one defining the session size as :window/window-key
.
BTW, is it possible to get a window per some key (e.g user-id) as in session, but with any windowing strategy? Alternatively, is it possible to have an infinite session, effectively getting a global window per user-id for example?
@camechis I searched the cheat sheet to reply and found :group-key
which I wasn't aware of. I don't think :group-by-key
affects windowing, but seems like :group-key
does. Not sure though.
Still, I'd like an actual window per group, triggering them separately etc, but probably not necessary for my case.
@yonatanel Re: session-key, yeah. I think that sentence should just be removed from the description. Can you PR to remove that from information_model.cljc?
Yes, set :onyx/group-by-key
or :onyx/group-fn
on the corresponding task that's windowed.
You can access the group in the trigger sync function's extent-state parameter under the :group
key. I think its the 2nd to the last parameter passed to sync
:onyx/group-by-key
does both hash routing, and discretization of windows by group. We were considering changing group-by-key to be renamed to hash-route, and having a separate parameter on the window named group-by which automatically does hash routing too, but we punted for now.
The backing windows in a grouped window are completely isolated from one another, and have independent triggers.
@michaeldrogalis This is a strong feature and I think the docs should show it off more. Thanks!