Reading JSON with Apache Spark – `corrupt_record`

As Spark expects “JSON Line format” not a typical JSON format, we can tell spark to read typical JSON by specifying:

val df = spark.read.option("multiline", "true").json("<file>")

Leave a Comment