Reputation: 354
I try this basic command to read a CSV in scala:
val df = spark.read
.option("header", "true")
.option("sep","|")
.option("inferSchema", "true")
.csv("path/to/_34File.csv")
And I get:
org.apache.spark.sql.AnalysisException: Unable to infer schema for CSV. It must be specified manually.
What could be the solution?
Upvotes: 2
Views: 2928
Reputation: 354
The solution is to rename de file from "_34File.csv" to "34File.csv". It's a peculiar case and that worked for me.
Upvotes: 3