Validating ingest pipelines¶
In order to validate Elasticsearch pipelines, you can call the following functions:
validate_ingest_pipeline_processors()
for normal processors, optionally present in theprocessors
attribute;validate_ingest_pipeline_failure_processors()
for processors run if the normal pipeline has failed, optionally present in theon_failure
attribute.
An example snippet doing this is the following:
from __future__ import annotations
from estceque import validate_ingest_pipeline_processors
raw_pipeline = {
"name": "hello",
"processors": [
{"json": {"field": "message"}},
],
}
print(validate_ingest_pipeline_processors(raw_pipeline))
The snippet above prints the following:
[{'json': {'field': 'message'}}]