-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
case classes generated by scalaxb cannot be serialized to Parquet #564
Comments
@ag4s
Could you provide more details please? - https://scalaxb.org/issue-reporting-guideline |
By using scalaxb the above case class is generated and it has DataRecord[Any]. Then using this case class I am reading the XML file using fromXML and saving it to val. They I am trying to save it to parquet format using spark or any other tool and that's where the problem happen. When spark try to read it, it cannot recognize the DataRecord[Any] and that is the problem. So like to save it into parquet or dataframe. Case classes generated can read XML my problem is how it is saved to parquet format if it needs to be saved (specially handling DataRecord[Any]). If you have any example of reading DataRecord[Any] for creating parquet would be great. |
Could you copy-paste the actual error message that you see during runtime? Is it missing Jackson databinding? |
ParquetWriter.writeAndClose(path, val) |
According to the readme, this is how you can write a codec? import com.github.mjakubowski84.parquet4s.{OptionalValueCodec, Value}
implicit def datarecordDummyCodec[A]: OptionalValueCodec[DataRecord[A]] =
new OptionalValueCodec[DataRecord[A]] {
override protected def decodeNonNull(value: Value, configuration: ValueCodecConfiguration): DataRecord[A] = ???
override protected def encodeNonNull(data: CustomType, configuration: ValueCodecConfiguration): Value = ???
} |
Wrote the above code but getting the same issue. Not sure if further more things are require to complete |
When I try to write a parquet file or Dataframe I am getting issue for DataRecord[Any]. How should I resolve the issue?
The text was updated successfully, but these errors were encountered: