File Uploader Result¶
UploadResult
¶
Representation of file upload result.
Container for file paths, divided into certain categories:
Added in 0.3.0
Examples:
>>> from onetl.file import FileUploader
>>> uploader = FileUploader(target_path="/remote", ...)
>>> upload_result = uploader.run(
... [
... "/local/file1",
... "/local/file2",
... "/failed/file",
... "/existing/file",
... "/missing/file",
... ]
... )
>>> upload_result
UploadResult(
successful=FileSet([
RemoteFile("/remote/file1"),
RemoteFile("/remote/file2"),
]),
failed=FileSet([
FailedLocalFile("/failed/file")
]),
skipped=FileSet([
LocalPath("/existing/file")
]),
missing=FileSet([
LocalPath("/missing/file")
]),
)
Parameters:
-
(successful¶FileSet[RemoteFile], default:FileSet()) –File paths (remote) which were uploaded successfully
-
(failed¶FileSet[FailedLocalFile], default:FileSet()) –File paths (local) which were not uploaded because of some failure
-
(skipped¶FileSet[LocalPath], default:FileSet()) –File paths (local) which were skipped because of some reason
-
(missing¶FileSet[LocalPath], default:FileSet()) –File paths (local) which are not present in the local file system