Re: What is the best way to re-key a KTable?

2018-01-23 Thread Matthias J. Sax
Exactly. Because you might get multiple values with the same key, you need to specify an aggregation to get a single value for each key. -Matthias On 1/23/18 9:14 AM, Dmitry Minkovsky wrote: > KStream has a simple `#selectKey()` method, but it appears the only way to > re-key a KTable is by

What is the best way to re-key a KTable?

2018-01-23 Thread Dmitry Minkovsky
KStream has a simple `#selectKey()` method, but it appears the only way to re-key a KTable is by doing `.toStream(mapper).groupByKey().reduce()`. Is this correct? I'm guessing this is because an attempt to re-key a table might result in multiple values at the new key.