This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-31
Channels
- # aws (1)
- # beginners (70)
- # boot (12)
- # calva (45)
- # cider (45)
- # clara (1)
- # cljdoc (10)
- # cljs-dev (133)
- # clojure (315)
- # clojure-dev (2)
- # clojure-europe (2)
- # clojure-italy (16)
- # clojure-nl (1)
- # clojure-spec (23)
- # clojure-uk (19)
- # clojurescript (48)
- # cursive (11)
- # data-science (5)
- # datomic (18)
- # figwheel-main (3)
- # fulcro (18)
- # graphql (14)
- # jackdaw (1)
- # juxt (1)
- # kaocha (1)
- # off-topic (10)
- # other-languages (3)
- # pathom (2)
- # pedestal (7)
- # re-frame (23)
- # reagent (1)
- # reitit (4)
- # ring-swagger (12)
- # rum (4)
- # shadow-cljs (26)
- # specter (6)
- # speculative (12)
- # tools-deps (44)
- # vim (8)
- # yada (2)
I have grouped a ktable by a new key, now I'm trying to aggregate the KGroupedTable so I can write it to a topic. With this aggregate function the output topic will contain no keys, but values as [k v]. What do I have to return from the adder function to write the k and v to a topic?
(-> book-table
(j/group-by (fn [[k v]]
(let [new-key (:book_id v)
message [new-key v]]
message))
output-topic)
(j/aggregate (constantly {})
(fn [acc msg]
msg)
(fn [acc msg]
acc)
output-topic)
(j/to-kstream)
(j/to output-topic)))