File Uploader Result¶
Bases: FileResult
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")
]),
)
successful = Field(default_factory=FileSet)
class-attribute
instance-attribute
¶
File paths (remote) which were uploaded successfully
failed = Field(default_factory=FileSet)
class-attribute
instance-attribute
¶
File paths (local) which were not uploaded because of some failure
skipped = Field(default_factory=FileSet)
class-attribute
instance-attribute
¶
File paths (local) which were skipped because of some reason
missing = Field(default_factory=FileSet)
class-attribute
instance-attribute
¶
File paths (local) which are not present in the local file system