The
...
Manual Data Injection stage is useful when you want to manually add custom data to your pipeline results. By specifying the data parameter, you can include any desired key-value pairs in the dictionary. The injected dictionary will
...
be included in the final response by default. However,
...
if you set the save_to_intermediate
...
property to true,
...
the dictionary will be stored in the intermediate response instead.
...
Additionally, if the expand_result
...
property is set to true, the injected data will be stored directly in the root of the final or intermediate response
...
, without being nested inside a key with the stage name. This can be helpful when you want the injected data to be easily accessible and integrated into the overall response structure.
Property | Description | Default | Type | Required |
---|---|---|---|---|
type | Stage class name | - | string | Yes |
enable | Enable stage for execution | true | boolean | No |
name | Name for this specific stage | string | No | |
save_to_intermediate | If true, the result of the stage will be stored in the intermediate instead of the final section | false | boolean | No |
expand_result | Indicates if the result of this stage should be expanded into the final data dictionary instead of being appended as usual | false | boolean | No |
ui_only | Section specific for UI configuration that affects the process of the stage | object | No | |
halt_on_exception | Indicates if the pipeline should be interrupted in case of an exception | false | boolean | No |
data | Dictionary to inject directly into the final response | object | Yes |
Code Block | ||||
---|---|---|---|---|
| ||||
_manual = ManualDataInjStage( name='manual', save_to_intermediate=False, expand_result=False, data={ 'message': 'This is a manually injected data', 'count': 10, 'flag': True } ) |