Search⌘ K
AI Features

Flat Mapping

Explore how to apply the flatMapValues operator in Kafka Streams to convert individual stream records into multiple output records, enabling complex transformations on data streams. Understand the difference between flatMap and flatMapValues, and learn to handle lists of values efficiently in your stream processing topology.

We'll cover the following...

Our topology is almost complete! For the next part, we’ll transform single records from each of the two streams we have into a list of feelings associated with them:

  • For the instrumental tracks, we’ll use Api::getFeelingsById, which returns List<Feeling>.

  • For the noninstrumental tracks, which we mapped to lyrics in the previous lesson, we’ll use ...