How to read avro file in linux

snippet of code:-
var df = spark.read.format(“avro”).option(“header”, “true”).load(read inputPath)

Added dependency in the sbt:-
libraryDependencies += “com.databricks” %% “spark-avro” % “3.2.0”