These runners read from, or write to, text files.
The runners are:
CSVExtractor
This runner extracts data from a CSV file. It will raise one new task per row
Configuration options
| Attribute | Data type | Default | Description |
|---|---|---|---|
| batchConfig | number | BatchConfig, mandatory | none | See batches |
| cancelCheckNumber | number | 100 |
How often, in tasks raised, to check if the extract should be cancelled |
| dataFile | string, mandatory | none | The path to the CSV file |
| delimiter | string | , |
The delimiter between columns |
| filters | string | string[] | None | The extract items to be ignored or included. See Ignoring extract items for more information. |
| hasHeaders | boolean | true |
Whether the file has a header row |
| hashName | string, mandatory | none | The lookup name for the extract hash |
| headers | string | none | Override the headers in the document, or supply missing headers. |
| ignoreHeaders | boolean | false |
Whether to ignore any supplied headers and use the column number as the attribute name |
| quarantinedLookupName | string | quarantinedCSVExtractor |
Name value for the quarantine lookup |
Message attributes
It adds the following attributes to the message object of raised tasks:
extractLinethe line number from the CSV fileextractItemthe row of data from the source fileextractHashthe hash of the extracted item, if a hashName is supplied.quarantinethe lookup to add to quarantine the object
CSVLoader
This runner adds an entry to a CSV file
Configuration options
| Attribute | Data type | Default | Description |
|---|---|---|---|
| addHash | boolean | true |
Whether to save the extractHash lookup |
| csvHeaders | string | none | If supplied, the first line of the CSV file. |
| csvTemplate | string, mandatory | none | The CSV line as a template literal. |
| targetPath | string | targetPath |
The message attribute with the path to the CSV file to be updated |
| targetPathTemplate | string | none | The path to csv file containing a template literal |
Message attributes
| Option | Data type | Description |
|---|---|---|
| targetPath, mandatory | string | The path to the file where the CSV is added. Mandatory if no targetPathTemplate provided. |
Message attribute names can be changed in the configuration options.
This runner does not update the message object.
JSONExtractor
This runner extracts tasks from a JSON file. One task per object
Configuration options
| Attribute | Data type | Default | Description |
|---|---|---|---|
| batchConfig | number | BatchConfig, mandatory | none | See batches |
| cancelCheckNumber | number | 100 |
How often, in tasks raised, to check if the extract should be cancelled |
| dataFile | string, mandatory | none | The path to the CSV file. |
| filters | string | string[] | None | The extract items to be ignored or included. See Ignoring extract items for more information. |
| hashName | string, mandatory | none | The lookup name for the extract hash |
| quarantinedLookupName | string | quarantinedJSONExtractor |
Name value for the quarantine lookup |
| startingObject | string | none | The object that contains the array to extract using dot notation, e.g. enterprise.users. |
Message attributes
It adds the following attributes to the message object of raised tasks:
extractHashthe hash of the extracted item, if a hashName is supplied.extractItemthe object from the source filequarantinethe lookup used to quarantine the object
JSONLoader
This runner adds an entry to a JSON file
Configuration options
| Attribute | Data type | Default | Description |
|---|---|---|---|
| addHash | boolean | true |
Whether to save the extractHash lookup |
| jsonTemplate | string, mandatory | none | The JSON object as a template literal. |
| targetPath | string | targetPath |
The message attribute with the path to the JSON file to be updated |
Message attributes
| Option | Data type | Description |
|---|---|---|
| targetPath, mandatory | string | The path to the file where the JSON is added. |
Message attribute names can be changed in the configuration options.
This runner does not update the message object.
XMLExtractor
This runner extracts data from a CSV file. It will raise one new task per row
Configuration options
| Attribute | Data type | Default | Description |
|---|---|---|---|
| batchConfig | number | BatchConfig, mandatory | none | See batches |
| cancelCheckNumber | number | 100 |
How often, in tasks raised, to check if the extract should be cancelled |
| dataFile | string, mandatory | none | The path to the CSV file. |
| filters | string | string[] | None | The extract items to be ignored or included. See Ignoring extract items for more information. |
| hashName | string, mandatory | none | The lookup name for the extract hash |
| quarantinedLookupName | string | quarantinedXMLExtractor |
Name value for the quarantine lookup |
| startingObject | string, mandatory | none | The object that contains the array to extract using dot notation, e.g. catalog.book. |
Message attributes
It adds the following attributes to the message object of raised tasks:
extractHashthe hash of the extracted item, if a hashName is supplied.extractItemthe row of data from the source filequarantinethe lookup to add to quarantine the object