Hi

The spark-avro module supports creation of a DataFrame from avro files. How
can convert a RDD of Avro objects that i get via SparkStreaming into a
DataFrame?

  val avroStream = KafkaUtils.createDirectStream[AvroKey[GenericRecord],
NullWritable, AvroKeyInputFormat[GenericRecord]](..)

https://github.com/databricks/spark-avro

// Creates a DataFrame from a specified fileDataFrame df =
sqlContext.read().format("com.databricks.spark.avro")
    .load("src/test/resources/episodes.avro");



Regards
Deenar

Reply via email to