Search code examples
scalahadoopthriftdata-warehouseparquet

What is the best way to write a Scala object to Parquet?


I have a Scala case class created from JSON, say case class Person(age:Int, name:String). I know I cannot write JSON to Parquet.

Can I write the case class directly to Parquet or do I need to use another format like Scrooge/Thrift or Avro? Which APIs are best to use for this?


Solution

  • I think you need to implement ParquetWriteSupport class to write your custom class.