MHegde
MHegde

Reputation: 397

How to generate avro ocf format(with schema) data/file using scala?

I am new bee to Scala.

I have a requirement where my data (in case class) needs to be written to S3 bucket in avro OCF(schema included) format. I could see ways to generate/serialise avro non-ocf(schemaless) format data in scala but could not find the way to generate OCF format.

This link example shows how to generate non-OCF format, but I am looking for OCF format generation https://dzone.com/articles/kafka-avro-scala-example

Any help/suggestion would be appreciated.

Upvotes: -1

Views: 551

Answers (1)

Matthias Berndt
Matthias Berndt

Reputation: 4587

You need to use the com.sksamuel.avro4s.AvroDataOutputStream class.

Upvotes: 1

Related Questions