Skip to content

Commit c4cba5a

Browse files
authored
[DOCS] Update esql-lookup-join.md (#127306)
- I trimmed the KEEP query in my final iteration in #127215 but neglected to update the query itself, only the response. This fixes that so the query matches the response. - 🚘 I also updated the table response to match other ESQL response tables
1 parent ff1c9b7 commit c4cba5a

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

docs/reference/query-languages/esql/esql-lookup-join.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,21 +122,19 @@ FROM firewall_logs # The source index
122122
| LOOKUP JOIN threat_list ON source.ip # The lookup index and join field
123123
| WHERE threat_level IS NOT NULL # Filter for rows non-null threat levels
124124
| SORT timestamp # LOOKUP JOIN does not guarantee output order, so you must explicitly sort the results if needed
125-
| KEEP timestamp, source.ip, destination.ip, action, threat_level, threat_type # Keep only relevant fields
125+
| KEEP source.ip, action, threat_type, threat_level # Keep only relevant fields
126126
| LIMIT 10 # Limit the output to 10 rows
127127
```
128128

129129
### Response
130130

131131
A successful query will output a table. In this example, you can see that the `source.ip` field from the `firewall_logs` index is matched with the `source.ip` field in the `threat_list` index, and the corresponding `threat_level` and `threat_type` fields are added to the output.
132132

133-
```
134-
source.ip | action | threat_type | threat_level
135-
---------------+---------------+---------------+---------------
136-
203.0.113.5 |allow |C2_SERVER |high
137-
198.51.100.2 |block |SCANNER |medium
138-
203.0.113.5 |allow |C2_SERVER |high
139-
```
133+
|source.ip|action|threat_type|threat_level|
134+
|---|---|---|---|
135+
|203.0.113.5|allow|C2_SERVER|high|
136+
|198.51.100.2|block|SCANNER|medium|
137+
|203.0.113.5|allow|C2_SERVER|high|
140138

141139
### Additional examples
142140

0 commit comments

Comments
 (0)