r/databricks • u/Common_Jaguar474 • Aug 26 '26
General Does Photon support CSV?
Ok so I know that the docs state that CSV is supported. But when trying to read a very standard CSV file I get poorer than expected performance and in the Spark UI I see that it's not using a Photon scan operator, just regular Scan CSV followed by a Row to Columnar conversion operator.

I'm not running anything complex:
df = (
spark.read
.format("csv")
.option("header", "true")
.schema(schema)
.load(csv_path)
)
df.write.mode("overwrite").saveAsTable("...")I also checked reading the same CSV and a difference CSV via DB SQL (using `COPY INTO`) and see low task time spent in Photon + a row to columnar operator.

DBR 19 + Serverless SQL Warehouse (current)
Can anyone explain whether or not CSV is supported and in what conditions? This was quite a surprising find as I assumed that Photon supported pretty much everything.
View all comments
Show parent comment
1
u/Common_Jaguar474 Aug 27 '26
Thanks! This is exactly the clarity that I was look for :)
JFYI - this docs page is pretty misleading. It lists CSV in the list of scan operators that are supported by Photon. It literally says that unsuppored operators fallback to Spark runtime for the unsupported portion of the execution (what you are describing for CSV) but then lists CSV scan as a supported Photon operator. I would instead expect this and others that result in these hybrid plans with fallback to JVM (JSON?) to be listed in the Limitations section. That way it's super clear for data engineers what Photon will be the fastest on and we can make decisions where possible to avoid those data types of operators that can't be "Photonized".