Closed nialloriordan closed 2 years ago
Hi @nialloriordan
Sorry for the late response - I was away on vacation :)
You fail to pass implicit schema, because you did not define it. Please check the docs how to do it.
val schema = record.getSchema()
throws an error because there's no such a function. In Parquet you define the schema like that https://github.com/mjakubowski84/parquet4s/blob/master/examples/src/main/scala/com/github/mjakubowski84/parquet4s/core/WriteAndReadGenericApp.scala#L34.
I hope that helps.
This is a very exciting package and I am currently trying to use
parquet4s
instead oforg.apache.parquet.avro
. However, I am having difficulty reading and writing via Generic Records even after following the documentation here.My current implementation with parquet4s is as follows:
This results in the following error:
I also tried to obtain the schema directly from the record but this does not seem to be possible in
parquet4s
:My current approach with
org.apache.parquet.avro
looks as follows:Do you have any recommendations on how to replicate the above in parquet4s? It is simply reading a parquet file and writing the parquet file again without any changes to the file.