Challenge - 5 Problems
Ingest Pipeline Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2:00remaining
What is the output of this ingest pipeline simulation?
Given the following ingest pipeline configuration and a document, what will be the value of the
full_name field after processing?Elasticsearch
{
"description": "Combine first and last name",
"processors": [
{
"set": {
"field": "full_name",
"value": "{{first_name}} {{last_name}}"
}
}
]
}
Document:
{
"first_name": "Alice",
"last_name": "Johnson"
}Attempts:
2 left
💡 Hint
Remember that double curly braces {{}} are used for variable substitution in ingest pipelines.
✗ Incorrect
The set processor uses mustache templates to replace variables with their values from the document. So {{first_name}} and {{last_name}} are replaced by "Alice" and "Johnson" respectively, resulting in "Alice Johnson".
❓ Predict Output
intermediate2:00remaining
What is the output of this pipeline with a grok processor?
Given this ingest pipeline and input document, what will be the value of the
status_code field after processing?Elasticsearch
{
"description": "Extract status code from message",
"processors": [
{
"grok": {
"field": "message",
"patterns": ["%{WORD:method} %{URIPATHPARAM:request} %{NUMBER:status_code:int}"]
}
}
]
}
Document:
{
"message": "GET /home 404"
}Attempts:
2 left
💡 Hint
The grok pattern uses :int to convert the extracted value to integer.
✗ Incorrect
The grok processor extracts the status code from the message field and converts it to an integer because of the :int suffix in the pattern.
🔧 Debug
advanced2:00remaining
Why does this pipeline fail with a 'field not found' error?
This ingest pipeline uses a rename processor but fails with an error. What is the cause?
Elasticsearch
{
"description": "Rename field",
"processors": [
{
"rename": {
"field": "user",
"target_field": "username"
}
}
]
}
Document:
{
"username": "bob123"
}Attempts:
2 left
💡 Hint
Check if the source field exists in the input document.
✗ Incorrect
The rename processor tries to rename a field that does not exist in the document. Since 'user' is missing, the processor fails with a 'field not found' error.
📝 Syntax
advanced2:00remaining
Which option shows a valid ingest pipeline with a conditional processor?
Select the pipeline JSON that correctly uses a condition to run a processor only if the field
status equals error.Attempts:
2 left
💡 Hint
The condition must be outside the processor object, not inside the processor's parameters.
✗ Incorrect
In ingest pipelines, the condition is specified as a sibling key to the processor type, not inside the processor's parameters. So 'if' is correct and placed outside the 'set' object.
🚀 Application
expert2:00remaining
How many processors run for this document in the pipeline?
Consider this pipeline with two processors and a condition on the second. How many processors will run when processing the document below?
Elasticsearch
{
"processors": [
{
"set": {
"field": "processed",
"value": true
}
},
{
"remove": {
"field": "debug"
},
"if": "ctx.debug == false"
}
]
}
Document:
{
"debug": true
}Attempts:
2 left
💡 Hint
Check the condition on the remove processor and the value of the debug field.
✗ Incorrect
The first processor always runs and sets 'processed' to true. The second processor runs only if ctx.debug == false, but debug is true, so it does not run.