Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to define a simple ingest pipeline that adds a field.
Elasticsearch
{
"description": "Add field pipeline",
"processors": [
{
"set": {
"field": "new_field",
"value": [1]
}
}
]
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to put quotes around string values.
Using unquoted text which causes JSON errors.
✗ Incorrect
The value must be a string, so it needs to be in quotes.
2fill in blank
mediumComplete the code to add a processor that converts a field to lowercase.
Elasticsearch
{
"processors": [
{
"lowercase": {
"field": [1]
}
}
]
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Not putting quotes around the field name.
Using a variable name without quotes.
✗ Incorrect
Field names in JSON must be strings, so use quotes.
3fill in blank
hardFix the error in the pipeline that uses a rename processor incorrectly.
Elasticsearch
{
"processors": [
{
"rename": {
"field": [1],
"target_field": "new_name"
}
}
]
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using unquoted field names causing JSON errors.
Confusing target_field with field.
✗ Incorrect
The field to rename must be a string with quotes.
4fill in blank
hardFill both blanks to create a pipeline that removes a field if it exists.
Elasticsearch
{
"processors": [
{
"remove": {
"field": [1],
"ignore_missing": [2]
}
}
]
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Putting quotes around true or false.
Using wrong field names.
✗ Incorrect
The field name must be a string, and ignore_missing is a boolean true.
5fill in blank
hardFill all three blanks to create a pipeline that sets a field only if it does not exist.
Elasticsearch
{
"processors": [
{
"set": {
"field": [1],
"value": [2],
"if": [3]
}
}
]
} Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong condition expression.
Not quoting strings properly.
✗ Incorrect
Set field 'status' to 'pending' only if ctx.status is null (does not exist).