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
| Attribute | Type | Description |
|---|---|---|
| path | str | The base storage location string used for task execution data and as a prefix for generating remote paths. |
| path_rewrite | Optional[[PathRewrite](pathrewrite.md?sid=flyte_models_pathrewrite)] = null | An optional configuration object used to define rules for transforming or mutating the raw data path. |
Constructor
Signature
def RawDataPath(
path: str,
path_rewrite: Optional[[PathRewrite](pathrewrite.md?sid=flyte_models_pathrewrite)] = None
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| path | str | The string representation of the raw data path. |
| path_rewrite | Optional[[PathRewrite](pathrewrite.md?sid=flyte_models_pathrewrite)] = None | An optional configuration for rewriting the path during task execution. |
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
| Name | Type | Description |
|---|---|---|
| local_folder | `str | pathlib.Path |
Returns
| Type | Description |
|---|---|
[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
| Name | Type | Description |
|---|---|---|
| file_name | Optional[str] = None | An optional filename to append to the randomly generated path segment. |
Returns
| Type | Description |
|---|---|
str | A unique, randomly generated absolute path string within the current data directory. |