How to import com.databricks.avro._


am getting “No module named com.databricks.spark.avro._” error

I’ve tried
pyspark --master yarn --conf spark.ui.port=12567 --packages com.databricks:spark-avro_2.10:2.0.1
pyspark --master yarn --conf spark.ui.port=12567 --packages com.databricks:spark-avro_2.11:4.0.0

command that are suggested in discussion,but progress is in vain


Can you try now and let us know


hi @Sunil_Itversity , even now i cant import the package


@Hariharan_Palanicham You don’t need to do the import. Go ahead with the code directly once you have loaded pyspark with avro library.

Try the below code to read avro file in a data frame.

df =“com.databricks.spark.avro”).load(“file.avro”)