Actually, I realize there’s a way more simple solution: just use the Feeder API.
Feeder is a type alias for Iterator[Map[String, Any]], so you can write something like:
val feeder = Iterator.from(0).map(i => Map(“i” → i))
Get it?
Cheers,
Stéphane