Skip to content

Commit 69c2b8b

Browse files
committed
Fix generation of lookup-join examples from csv-spec files
1 parent 6967ffb commit 69c2b8b

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

docs/reference/query-languages/esql/_snippets/commands/examples/lookup-join.csv-spec/filterOnLeftSide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ FROM employees
99

1010
| emp_no:integer | language_code:integer | language_name:keyword |
1111
| --- | --- | --- |
12-
| 10091 | 3 | Spanish |
13-
| 10092 | 1 | English |
14-
| 10093 | 3 | Spanish |
12+
| 10091 | 3 | Spanish |
13+
| 10092 | 1 | English |
14+
| 10093 | 3 | Spanish |

docs/reference/query-languages/esql/_snippets/commands/examples/lookup-join.csv-spec/filterOnRightSide.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ FROM employees
99

1010
| emp_no:integer | language_code:integer | language_name:keyword |
1111
| --- | --- | --- |
12-
| 10091 | 3 | Spanish |
13-
| 10092 | 1 | English |
14-
| 10093 | 3 | Spanish |
12+
| 10091 | 3 | Spanish |
13+
| 10092 | 1 | English |
14+
| 10093 | 3 | Spanish |

x-pack/plugin/esql/qa/testFixtures/src/main/resources/docs-lookup-join.csv-spec

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
lookupJoinSourceIp
1414
required_capability: join_lookup_v12
1515

16-
// tag::lookupJoinSourceIp
16+
// tag::lookupJoinSourceIp[]
1717
FROM firewall_logs
1818
| LOOKUP JOIN threat_list ON source.IP
19-
// end:lookupJoinSourceIp
19+
// end::lookupJoinSourceIp[]
2020
;
2121

2222
@timestamp:datetime | destination.IP:ip | message:keyword | source.IP:ip | threat_level:keyword
@@ -28,11 +28,11 @@ FROM firewall_logs
2828
lookupJoinSourceIpWhere
2929
required_capability: join_lookup_v12
3030

31-
// tag::lookupJoinSourceIpWhere
31+
// tag::lookupJoinSourceIpWhere[]
3232
FROM firewall_logs
3333
| LOOKUP JOIN threat_list ON source.IP
3434
| WHERE threat_level IS NOT NULL
35-
// end:lookupJoinSourceIpWhere
35+
// end::lookupJoinSourceIpWhere[]
3636
;
3737

3838
@timestamp:datetime | destination.IP:ip | message:keyword | source.IP:ip | threat_level:keyword
@@ -44,11 +44,11 @@ FROM firewall_logs
4444
lookupJoinHostNameTwice
4545
required_capability: join_lookup_v12
4646

47-
// tag::lookupJoinHostNameTwice
47+
// tag::lookupJoinHostNameTwice[]
4848
FROM system_metrics
4949
| LOOKUP JOIN host_inventory ON host.name
5050
| LOOKUP JOIN ownerships ON host.name
51-
// end:lookupJoinHostNameTwice
51+
// end::lookupJoinHostNameTwice[]
5252
;
5353

5454
count:long | details:keyword | host.name:keyword | description:keyword | host.os:keyword | host.version:keyword | owner.name:keyword
@@ -60,10 +60,10 @@ count:long | details:keyword | host.name:keyword | description:keyword | host.os
6060
lookupJoinIpServiceId
6161
required_capability: join_lookup_v12
6262

63-
// tag::lookupJoinIpServiceId
63+
// tag::lookupJoinServiceId[]
6464
FROM app_logs
6565
| LOOKUP JOIN service_owners ON service_id
66-
// end:lookupJoinIpServiceId
66+
// end::lookupJoinServiceId[]
6767
;
6868

6969
@timestamp:datetime | message:keyword | service_id:keyword | owner:keyword

x-pack/plugin/esql/qa/testFixtures/src/main/resources/lookup-join.csv-spec

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ FROM employees
494494
| EVAL language_code = languages
495495
| WHERE emp_no >= 10091 AND emp_no < 10094
496496
| LOOKUP JOIN languages_lookup ON language_code
497-
// end:filterOnLeftSide[]
497+
// end::filterOnLeftSide[]
498498
| SORT emp_no
499499
| KEEP emp_no, language_code, language_name
500500
;
@@ -504,7 +504,7 @@ emp_no:integer | language_code:integer | language_name:keyword
504504
10091 | 3 | Spanish
505505
10092 | 1 | English
506506
10093 | 3 | Spanish
507-
// end:filterOnLeftSide-result[]
507+
// end::filterOnLeftSide-result[]
508508
;
509509

510510
filterOnRightSide
@@ -515,7 +515,7 @@ FROM employees
515515
| EVAL language_code = languages
516516
| LOOKUP JOIN languages_lookup ON language_code
517517
| WHERE emp_no >= 10091 AND emp_no < 10094
518-
// end:filterOnRightSide[]
518+
// end::filterOnRightSide[]
519519
| SORT emp_no
520520
| KEEP emp_no, language_code, language_name
521521
;
@@ -525,7 +525,7 @@ emp_no:integer | language_code:integer | language_name:keyword
525525
10091 | 3 | Spanish
526526
10092 | 1 | English
527527
10093 | 3 | Spanish
528-
// end:filterOnRightSide-result[]
528+
// end::filterOnRightSide-result[]
529529
;
530530

531531
filterOnRightSideMessages

0 commit comments

Comments
 (0)