Skip to main content

RawDataPath

A class representing the raw data path for a task. This is used to store the raw data for the task execution and also get mutations on the path.

Attributes

AttributeTypeDescription
pathstrThe path to the raw data for the task execution, which is used to store the raw data and get mutations on the path.
path_rewriteOptional[[PathRewrite](pathrewrite.md?sid=flyte_models_pathrewrite)] = NoneAn optional object that defines how the raw data path should be rewritten, affecting how the path is interpreted or modified.

Methods


from_local_folder()

@classmethod
def from_local_folder(
local_folder: str | pathlib.Path | None = None
) - > [RawDataPath](rawdatapath.md?sid=flyte_models_rawdatapath)

Create a new context attribute object, with local path given. Will be created if it doesn't exist.

Parameters

NameTypeDescription
local_folder`strpathlib.Path

Returns

TypeDescription
[RawDataPath](rawdatapath.md?sid=flyte_models_rawdatapath)Path to the temporary directory

get_random_remote_path()

@classmethod
def get_random_remote_path(
file_name: Optional[str] = None
) - > str

Returns a random path for uploading a file/directory to. This file/folder will not be created, it's just a path.

Parameters

NameTypeDescription
file_nameOptional[str] = NoneIf given, will be joined after a randomly generated portion.

Returns

TypeDescription
str