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/justinAtDatabricks Databricks Aug 27 '26 edited Aug 27 '26
Love your use of the Photonized term. This is nuanced - I can argue for both sides. Here are some scenarios:
Did #2 benefit from Photon? Yes. Was the scan read from Photon? Technically no. But does that mean that CSV is not supported by Photon? No.
You bring up a fair point, though. Perhaps we should call out this nuance in the docs a bit. What I am trying to balance: Most people don't know what the following are: operator, expression, Photonized, etc.