Challenge - 5 Problems
Elasticsearch Visualization Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediateWhat is the output of this Elasticsearch aggregation visualization query?
Given the following Elasticsearch aggregation query for a bar chart visualization, what will be the count of documents in the bucket for the term "status:200"?
Elasticsearch
{
"size": 0,
"aggs": {
"status_codes": {
"terms": {
"field": "status",
"size": 3
}
}
}
}Attempts:
2 left
💡 Hint
Terms aggregation groups documents by unique values of a field.
✗ Incorrect
Terms aggregation groups documents by unique values of the specified field. Here, it groups by the 'status' field, so the bucket for 'status:200' contains all documents with status 200.
🧠 Conceptual
intermediateWhat type of visualization is best for showing trends over time in Elasticsearch?
You want to visualize the number of sales per day over the last month using Elasticsearch aggregations. Which visualization type is most appropriate?
Attempts:
2 left
💡 Hint
Trends over time are best shown with continuous time-based charts.
✗ Incorrect
Line charts are ideal for showing trends over time because they plot data points sequentially along a time axis.
🔧 Debug
advancedWhy does this Elasticsearch pie chart show only one slice?
You created a pie chart visualization with a terms aggregation on the field 'category'. However, the pie chart shows only one slice labeled 'Other'. What is the most likely cause?
Elasticsearch
{
"size": 0,
"aggs": {
"categories": {
"terms": {
"field": "category",
"size": 5,
"min_doc_count": 10
}
}
}
}Attempts:
2 left
💡 Hint
min_doc_count filters out buckets with fewer documents.
✗ Incorrect
The min_doc_count:10 means only terms with at least 10 documents appear as separate slices. If none meet this, all are grouped into 'Other'.
🧠 Conceptual
advancedWhich Elasticsearch visualization type is best for showing hierarchical data?
You want to visualize data that has multiple levels, such as country > state > city. Which visualization type is best suited for this?
Attempts:
2 left
💡 Hint
Hierarchical data needs nested visualization.
✗ Incorrect
Sunburst charts display hierarchical data as concentric rings, making it easy to see nested relationships.
📝 Syntax
expertWhat error does this Elasticsearch aggregation query produce?
Examine the following aggregation query and identify the error it will cause.
Elasticsearch
{
"size": 0,
"aggs": {
"sales_over_time": {
"date_histogram": {
"field": "sale_date",
"calendar_interval": "1d"
}
}
}
}Attempts:
2 left
💡 Hint
Elasticsearch changed the 'interval' parameter in date_histogram.
✗ Incorrect
The 'interval' parameter in date_histogram is deprecated in recent Elasticsearch versions. It must be replaced with 'calendar_interval' or 'fixed_interval'.
