PathRewrite
Configuration for rewriting paths during input loading.
Attributes
| Attribute | Type | Description |
|---|---|---|
| old_prefix | str | If set, rewrites any path starting with this prefix to the new prefix. |
| new_prefix | str | The replacement string used to substitute the matching old_prefix in the path. |
Constructor
Signature
def PathRewrite(
old_prefix: str,
new_prefix: str
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| old_prefix | str | The original path prefix to be replaced. |
| new_prefix | str | The new path prefix to replace the old one with. |
Methods
from_str()
@classmethod
def from_str(
pattern: string
) - > [PathRewrite](pathrewrite.md?sid=flyte_models_pathrewrite)
Create a PathRewrite from a string pattern of the form old_prefix- >new_prefix.
Parameters
| Name | Type | Description |
|---|---|---|
| pattern | string | The string representation of the rewrite rule using '- >' as a delimiter between the source and target prefixes. |
Returns
| Type | Description |
|---|---|
[PathRewrite](pathrewrite.md?sid=flyte_models_pathrewrite) | A new instance of PathRewrite configured with the parsed prefixes. |