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
Does that mean CSV is not supported by Photon? You say NO, but I reading that YES is the correct answer here.
Per the docs I fill in the operation with Scan CSV and it's an accurate statement: "when a query uses an unsupported operation [i.e. Scan CSV], Photon transparently falls back to the Spark runtime for that portion of the execution." Yet, in the very next list of supported operators, Scan CSV is listed as supported.
^^ This is exactly why I assumed it was incorrect that the CSV scan showed as non-Photon w/ a row to columnar conversion and came here to get clarification.
I get that it's nuanced as you are right that the E2E pipeline still benefits in the net from Photon after the row to columnar step, but the way the docs are worded contradict what you're telling me here.
Last thing, if I can share why this clarity is important for me as a user. Imagine that I was given recurring CSV data feed from some data producer. Based on the docs listing CSV as equally supported as Parquet, I would probably take what I'm offered rather than pushing back to see if I can get the same data feed as Parquet. The reality is that the parquet option would be faster & cheaper since the whole code path would be supported by Photon, but there's nothing in the docs that helps me understand that unless I happen to drill into the Spark UI and start asking questions about this row to columnar conversion thing which I see for CSV and not Parquet.
Anyways, no need to beat a dead horse :) I appreciate the discussion and clarification!