0
0
Elasticsearchquery~10 mins

Lens for drag-and-drop analysis in Elasticsearch - Step-by-Step Execution

Choose your learning style9 modes available
Concept Flow - Lens for drag-and-drop analysis
Open Lens Interface
Select Data Source
Drag Field to Visualization Area
Lens Auto-Detects Visualization Type
Adjust Visualization Settings
View Updated Visualization
Repeat Drag-and-Drop for More Fields
Save or Export Analysis
Lens lets you drag fields from your data to create visualizations quickly, auto-selecting the best chart type and updating it as you add more fields.
Execution Sample
Elasticsearch
1. Open Lens in Kibana
2. Choose an index pattern
3. Drag 'timestamp' to X-axis
4. Drag 'count' to Y-axis
5. Lens shows a time series chart
This example shows how dragging fields creates a time series chart automatically.
Execution Table
StepActionInput FieldLens ResponseVisualization State
1Open Lens Interface-Lens ready for inputEmpty canvas
2Select Data Sourceindex-pattern: logs-*Fields loadedEmpty canvas
3Drag fieldtimestampAssign to X-axisX-axis set to timestamp
4Drag fieldcountAssign to Y-axisY-axis set to count, chart type: line
5Lens auto-selects chart-Line chart displayedTime series line chart shown
6Drag fieldhost.keywordAdd as breakdownChart splits by host.keyword
7Adjust settingsChange color paletteColors updatedChart colors changed
8Save analysis-Saved successfullyAnalysis saved
9Exit--Lens closed
💡 User finishes analysis and closes Lens interface
Variable Tracker
VariableStartAfter Step 3After Step 4After Step 6Final
X-axis fieldNonetimestamptimestamptimestamptimestamp
Y-axis fieldNoneNonecountcountcount
Breakdown fieldNoneNoneNonehost.keywordhost.keyword
Chart typeNoneNonelinelineline
Visualization stateEmptyX-axis setLine chartSplit by host.keywordFinal saved chart
Key Moments - 3 Insights
Why does Lens automatically choose a line chart after dragging timestamp and count?
Lens detects that timestamp is a time field and count is numeric, so it picks a line chart to best show trends over time, as seen in execution_table row 5.
What happens if you drag a keyword field after setting X and Y axes?
Lens adds the keyword field as a breakdown or split dimension, updating the chart to show multiple lines or segments, shown in execution_table row 6.
Can you change the chart type manually after Lens auto-selects it?
Yes, you can adjust visualization settings like chart type or colors anytime, as shown in execution_table row 7.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what is the visualization state after step 4?
AY-axis set to count, chart type: line
BX-axis set to timestamp only
CY-axis set to count only
DChart splits by host.keyword
💡 Hint
Check the Visualization State column at step 4 in execution_table
At which step does Lens add a breakdown field to the visualization?
AStep 3
BStep 4
CStep 6
DStep 7
💡 Hint
Look for when 'host.keyword' is dragged in execution_table
If you drag a numeric field instead of 'count' at step 4, how would the visualization state change?
ALens would show a pie chart
BLens would still show a line chart with the new numeric field on Y-axis
CLens would remove the X-axis field
DLens would not update the chart
💡 Hint
Lens auto-selects chart types based on field types, see step 5 in execution_table
Concept Snapshot
Lens lets you drag fields from your data to build visualizations.
Drag a time field to X-axis and a numeric field to Y-axis.
Lens auto-selects the best chart type (like line chart for time series).
Add keyword fields to split data by categories.
Adjust colors and settings anytime.
Save your analysis when done.
Full Transcript
Lens is a tool in Kibana that helps you create visualizations by dragging fields from your data. First, you open Lens and select your data source. Then you drag a time field like 'timestamp' to the X-axis and a numeric field like 'count' to the Y-axis. Lens automatically chooses a line chart to show trends over time. You can add more fields, such as a keyword field, to split the chart into categories. You can also change colors and other settings. Finally, you save your analysis. This step-by-step process helps you explore data visually without writing code.