Serialize your Spark Dataframes to and from Avro.
This project provided serialization/deserialization for seamless conversion between spark dataframes and avro.
However, Spark 2.4 added several methods within Spark for converting Spark DataFrames & Avro Generic Records.
I'll try to update the code, it's work in progress.