Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Document additional config attribute 'class_name'

The config file used for Pipelets has a strict JSON format. In the following chapters you can find the description of the attributes used in these files and some examples.

...

Table of Contents
outlinetrue
excludeTable of Contents

Pipelets config file

When creating a new pipelet it is mandatory to create a config file which references the pipelet itself.

...

Code Block
languagejs
{
    "DummyPipeletClass":{
        "file_location":"pipelets\dummy_pipelet.py",
        "stage":"before templating",
        "config": {
            "restricted_fields_columns": ["HeaderRestrictedFieldNames", "DetailRestrictedFieldNames"]
        }
    },
    "DummyPipeletClass2":{
		"class_name": "DummyPipeletClass"
        "file_location":"pipelets\dummy_pipelet.py",
        "stage":"after templating",
        "config": { 
            "restricted_fields_columns": ["HeaderRestrictedFieldNames", "DetailRestrictedFieldNames"]
        }
    }  
}

...

The pipelets config files contains the following attributes.

KeyData TypeDescriptionNotes

config

Dictionary

Contains the attributes of each piplet. This dictionary is passed in as a constructor argument to the pipelet.


file_location

String

The location of the Python file. This is mandatory. It can be the full path or the relative location from where the tool is executed


stage

String

Specifies when the pipelets consume method will be executed.

Possible values:

  • "before templating" - default
  • "after templating"

class_nameString

The name of main python class of the pipelet. The class is expected to be a child class of PipeletV1.

If class_name is missing, the key of the top-level dictionary is used to determine class name (DummyPipeletClass in the example above).

Introduced in version 2.6.5.

In earlier version the top-level key was always used. 

Specifying this attribute allows running the same pipelet multiple times, each with a different config