How to handle rejected records in Spark. Is the below given sample method the right way to handle it? Is there any other better approach?
val df = spark.read