title: How to read binary avro fileData, with Source in akka?
body: <p>I'm trying to read an avro file with Source from akka Streams. </p>
  
  <p>Source in akka streams read data like FileIO.FromPath(File), which will read and separate the lines based on (\n) character, where as for avro how does it work?</p>
  
  <p>Flow :</p>
  
  <pre><code>    object AvroFlow  {
      def apply(jobDate: String): Flow[GenericRecord, GenericRecord, NotUsed] = {
              Flow[GenericRecord].map { rec =&gt; rec.put("date", "20190812") rec}       
      }
    }
  </code></pre>
  
  <p>Graph:</p>
  
  <pre><code>object AvroRunner {
      def build (src: Source[GenericRecord, NotUsed],
                                       flw: Flow[GenericRecord, GenericRecord, NotUsed],
                                       snk:Flow[GenericRecord, Future[Done])
      : AvroRunner = {
        new AvroRunner(srtc,flw,snk)
      }
    }
  class AvroRunner private(src: Source[GenericRecord, NotUsed],
                                       flw: Flow[GenericRecord, GenericRecord, NotUsed],
                                       snk:Flow[GenericRecord, Future[Done]){
    import scala.concurrent.ExecutionContext.Implicits.global
    val GraphRunner = RunnableGraph.fromGraph(GraphDSL.create() {implicit builder =&gt;
      import GraphDSL.Implicits._
      src ~&gt; flw ~&gt; snk
      ClosedShape
    })
  }
  </code></pre>