Export Pipelines
Export pipelines chain together components — templating, REST API calls, data extraction, evaluation, and file storage — to move processed document data to downstream systems after annotation.
After documents are processed in Rossum, the extracted data typically needs to be exported to downstream systems. The Rossum team has prepared an Export pipeline for this purpose.
Components of Export pipelines
An export pipeline consists of the following components chained together:
- Custom Format Templating Purge, a cleaning mechanism that prepares the pipeline for export.
- Custom Format Templating, which prepares the desired export format.
- REST API Export, which exports the prepared data to a REST API and stores the response.
- Data Value Extractor, which extracts important data from the API response and stores it in the annotation object, such as the downstream document ID and HTTP status codes.
- Export Evaluator, which determines whether the export succeeded or failed.
- SFTP Export, which uploads the prepared data to SFTP or S3 file storage.
How to use Export pipelines
Export pipeline components are typically connected by the standard run-after extension-chaining mechanism. The following examples demonstrate several extension chains.
Simple SFTP export pipeline
- Custom Format Templating prepares the extracted data in the desired format.
- SFTP Export stores the data on an SFTP server or in S3.
Configure the export_rules of your SFTP extension as follows to accept the Custom Format Templating output:
{
"path_to_directory": "/Path_To_Your_Directory",
"export_object_configurations": [
{
"type": "custom_format",
"filename_template": "{export_order_name}.json",
"export_reference_key": "your_reference_key"
}
]
}
Simple API export pipeline
- Optionally, Pipeline Cleaning removes previous export data. This is useful for debugging.
- Custom Format Templating prepares the extracted data in the desired format.
- REST API Export calls an external API service and sends the prepared data. The extension also stores returned values, including the status code.
- Data Value Extractor stores required information, such as the status code, in the document.
- Export Evaluator uses a condition, such as a status code of
200or201, to determine whether the export succeeded.
Complex API export pipeline
We are still working on this section and would appreciate your input. You can share your feedback or submit a pull request.