Flat Mapping

Learn about Kafka Streams’ flatMap and flatMapValues operators.

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 Api::getFeelingsByLyrics, which also returns List<Feeling>.

Get hands-on with 1200+ tech skills courses.