We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 369df6e commit 752b63fCopy full SHA for 752b63f
pyiceberg/io/pyarrow.py
@@ -288,6 +288,8 @@ def create(self, overwrite: bool = False) -> OutputStream:
288
try:
289
if not overwrite and self.exists() is True:
290
raise FileExistsError(f"Cannot create file, already exists: {self.location}")
291
+ # Parent directories must be created first in certain file systems, such as the LocalFileSystem.
292
+ self._filesystem.create_dir(os.path.dirname(self._path), recursive=True)
293
output_file = self._filesystem.open_output_stream(self._path, buffer_size=self._buffer_size)
294
except PermissionError:
295
raise
0 commit comments