We need to process our stream of database columns (or products if we use the converter like before) in such a way that all related entities will be grouped into one product and emitted as such. After browsing the documentation of fs2, we stumble upon a function called groupAdjacentBy. Let’s try it.