Steps

Steps that you can use

Reader

This step read dataset through a queue. For each data in input, it fetch the resource, read resource's data and put each data into the queue for the next step.

keyaliasDescriptionDefault ValuePossible Values
type-Required in order to use reader stepreaderreader / read / r
connectorconnConnector type to use in order to read a resourceioSee connectors
documentdocDocument type to use in order to manipulate the resourcejsonSee documents
alias-Alias the step use during the debug modenoneAuto generate alphanumeric value
descriptiondescDescrib your step and give more visibilitynoneString
data_typedataType of data the reader push in the queue : [ ok / err ]okok / err

examples:

[
    {
        "type": "reader",
        "alias": "read_a",
        "description": "My description of the step",
        "connector": {
            "type": "io"
        },
        "document": {
            "type": "json"
        },
        "data_type": "ok"
    }
]

Writer

This step read dataset through a queue and write data in a resource though a connector and document type.

keyaliasDescriptionDefault ValuePossible Values
type-Required in order to use writer stepwriterwriter / write / w
connectorconnConnector type to use in order to read a resourceioSee connectors
documentdocDocument type to use in order to manipulate the resourcejsonSee documents
alias-Alias the step use during the debug modenoneAuto generate alphanumeric value
descriptiondescDescrib your step and give more visibilitynoneString
data_typedataType of data read for writing. skip other data typeokok / err
thread_numberthreadsParallelize the step in multiple threads1unsigned number
dataset_sizebatchStack size limit before to push data into the resource though the connector1000unsigned number

examples:

[
    {
        "type": "writer",
        "alias": "write_a",
        "description": "My description of the step",
        "connector": {
            "type": "io"
        },
        "document": {
            "type": "json"
        },
        "data_type": "ok",
        "thread_number": 1,
        "dataset_size": 1000
    }
]

Transformer

This step read dataset through a queue, transform the data with actions and write the output object into the queue.

keyaliasDescriptionDefault ValuePossible Values
type-Required in order to use transformer steptransformertransformer / transform / t
updateruUpdater type used as a template engine for treansformationteratera
referentialsrefsList of reader that can be use to map object during the transformation. Use the referential alias in the action's patternnone{"alias_a": READER,"alias_b": READER, etc...}
alias-Alias the step use during the debug modenoneAuto generate alphanumeric value
descriptiondescDescrib your step and give more visibilitynoneString
data_typedataType of data used for the transformation. skip other data typeokok / err
thread_numberthreadsParallelize the step in multiple threads1unsigned number
actions-List of actions composednoneSee Action
input_nameinputInput name variable can be used in the pattern actioninputString
output_nameoutputOutput name variable can be used in the pattern actionoutputString

Action

keyDescriptionDefault ValuePossible Values
fieldJson pointer that define the field path created into the output object/alphanumeric or json pointer
patternPattern in django template language format used to build the output field. This project use Tera's methodsnone
typeType of actionmergemerge / replace / remove

examples:

[
    {
        "type": "transformer",
        "updater": {
            "type": "tera"
        },
        "referentials": {
            "ref_a": {
                "connector": {
                    "type": "io"
                }
            }
        },
        "alias": "transform_a",
        "description": "My description of the step",
        "connector": {
            "type": "io"
        },
        "document": {
            "type": "json"
        },
        "data_type": "ok",
        "thread_number": 1,
        "actions": [{
            "field": "field_A",
            "pattern": "{{ my_input.number * my_output.number * ref_a.number }}",
            "type": "merge"
        }],
        "input_name": "my_input",
        "output_name": "my_output"
    }
]

Eraser

keyaliasDescriptionDefault ValuePossible Values
type-Required in order to use eraser steperasereraser / eraser / truncate / e
connectorconnConnector type to use in order to read a resourceioSee connectors
alias-Alias the step use during the debug modenoneAuto generate alphanumeric value
descriptiondescDescribe your step and give more visibilitynoneString
exclude_pathsexcluderesource to exclude for the erase stepnoneList of string
[
    {
        "type": "erase",
        "alias": "erase_a",
        "description": "My description of the step",
        "connector": {
            "type": "local",
            "path": "./*.json"
        },
        "exclude_paths": [
            "file1.json"
        ]
    }
]