Share via

How to fix broken read/write Pythonic operations in Azure Databricks?

Robert Tinn 1 Reputation point
2021-12-21T12:57:42.927+00:00

My team has a production pipeline running in Azure Databricks using PySpark. This pipeline is automated and has been running for months with zero issues. Recently it has broken because I can no longer use certain read/write to files in a mounted blob storage account. No changes have been to the code or environment during this time so it is unclear why it has suddenly broken.

Spark read/write operations such as "sc.textFile()" work perfectly well as before.

However standard Pythonic operations such as "open()" now always throw the error "FileNotFoundError: [Errno 2] No such file or directory" when the files definitely exist and could always be read fine before.

Please advise how to fix this.

Azure Databricks
Azure Databricks

An Apache Spark-based analytics platform optimized for Azure.


1 answer

Sort by: Most helpful
  1. Robert Tinn 1 Reputation point
    2021-12-22T14:54:47.267+00:00

    Thanks for the quick response. I just figured out the issue. It turns out someone rotated the keys for the storage account and somehow that was responsible for this unusual error. By simply unmounting and then remounting the storage account in Databricks resolved this issue :)

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.