Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2025 08:04 AM
Hey @Dhruv-22 ,
Oh .. this totally makes sense now. In that case, it is a true corrupt record..You can just add the read option DROPMALFORMED and it should work
df1 = (spark.read
.format("json")
.option("mode", "DROPMALFORMED") # <- drops malformed record
.load(base))
df1.display()
Anudeep