Greetings - to start off, below is an example of a pipelet used in one of our sandbox projects:
Example Pipelet
{
"id": "2m3m4ms5l2234-JpSA",
"key": "sandbox_instance/Remove_Duplicates",
"type": "pipelet",
"config": { "pipelet": "sandbox_instance/Remove_Duplicates" },
"config_options": [
{
"display_label": "Some Config Option",
"help": "Sets a config option",
"name": "some_config_option",
"required": false,
"type": "string"
}
],
"description": "A more detailed description of the pipelet",
"linked_steps": ["Indexing"],
"message": null,
"name": "Remove_Duplicates",
"precede_steps": [],
"section": "enrich",
"succeed_steps": [],
"summary": "Removes duplicates from the source"
}
‘Type’ and ‘Key’
Before using the new_pipeline_workflow() method, I would like to assume that the pipelet has already been completed and uploaded to the instance. If the user attempts to create a pipeline workflow with a pipelet that is not uploaded, a 404 error will occur. The common method of uploading a pipelet is found here:
Pipelet Upload
The type field will be as follows: 'type': 'pipelet'
To specify which pipelet is used, we utilize the key field. This is taken from the id of the pipelet itself, which is not to be confused the id of the pipelet within the workflow. Put simply, you can find the id of the pipelet using the client’s get_pipelet() method. Please note that it follows the pattern of instance_name/pipelet_name
get_pipelet()
client.get_pipelet('textrazor')
{
'id': 'tenant01/textrazor',
'description': 'Entity extraction with `TextRazor`.',
'name': 'textrazor',
...
}
Used in the context of new_workflow_pipeline()
, the pipelet’s key will be written like this:
'key': 'tenant01/textrazor'
Minimum Required Info
Below is the minimal amount of properties to successfully include a custom pipelet in the new_workflow_pipeline() method:
Please note that config
and config_options
must be present, even if empty. Also note that a section
must be specified, though this can be changed later. Information on available sections is found here:
Pipeline Sections
{
"key": "sandbox_instance/Remove_Duplicates",
"name": "Remove_Duplicates",
"type": "pipelet",
"section": "enrich",
"config": {},
"config_options": [],
}
We hope you find this information helpful as you continue in your interest using Squirro!
Please reach out if you have any further questions.
Sincerely,
Hubert Shon, Solutions Engineer