Home / Spark / Connectors and classpath
Spark: [PATH_NOT_FOUND] Path does not exist
org.apache.spark.sql.AnalysisException[PATH_NOT_FOUND] Path does not exist: hdfs://nn/warehouse/events/dt=2025-10-21.A path passed to a read does not exist at planning time. Typical causes are a wrong date partition, a missing scheme (hdfs://, s3a://) or a file that another job deleted between listing and reading.
Common causes
- A partition or date in the path has not been produced yet.How to confirm: List the parent directory and compare with the path in the message.
- The path resolves against the wrong filesystem because the scheme is missing.How to confirm: The message shows file: or the default filesystem instead of the one you expected.
How to fix it
Check that the path exists before reading, or read the parent directory with a partition filter instead of naming each partition.
If files can disappear while the job runs (for example retention cleanup), allow Spark to skip them.
| Setting | Default | Note |
|---|---|---|
spark.sql.files.ignoreMissingFiles | false |
Where the message comes from
error-conditions.jsoninapache/sparkatv4.1.3- Message checked in Spark 4.1.3 (error condition PATH_NOT_FOUND)
Message template in the source: Path does not exist: <path>.