Module chewdata::step::eraser

source ·
Expand description

Erase the content of the crate::connector.

§Actions

1 - Get a crate::Context from the input queue.
2 - Extract the crate::DataResult from the crate::Context.
3 - Erase the content of the resource.
4 - Reuse the current crate::Context and attach the crate::DataResult to it.
5 - Push the new crate::Context into the output queue.
6 - Go to step 1 until the input queue is not empty.

§Configuration

keyaliasDescriptionDefault ValuePossible Values
type-Required in order to use eraser steperasereraser / eraser / truncate / e
connector_typeconn / connectorConnector type to use in order to read a resourceioSee crate::connector
namealiasName stepnullAuto generate alphanumeric value
exclude_pathsexcluderesource to exclude for the erase stepnullList of string
data_typedataType of data used for the transformation. skip other data typeokok / err

§Examples

[
    {
        "type": "erase",
        "name": "erase_a",
        "data_type": "ok",
        "connector": {
            "type": "local",
            "path": "./*.{{ metadata.mime_subtype }}"
        },
        "exclude_paths": [
            "file1.json"
        ]
    }
]

Structs§