Q1. Considering I have a dataframe df
and a schema myschema
, how do I proceed to write the dataframe into kafka topic in an avro format ?
Q2. Is there any optimized way if we do not consider udf
?
Most of the available solutions are for spark > 2.4 where they have inbuilt avro functions to use.