You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ES|QL] Docs for lookup join UX improvements in Kibana and support for remote lookup indices (#3317)
This PR:
- Adds mention of the support for lookup indices from remote clusters in
lookup join ES|QL commands from 9.2
- Adds a section about the ability to view/create/edit lookup indices,
depending on privileges, when using LOOKUP JOIN in an ES|QL query from
Discover
Dear reviewers, you can find direct preview links of the edited page in
the 1st comment below
Closes: #3097
Copy file name to clipboardExpand all lines: explore-analyze/discover/try-esql.md
+59Lines changed: 59 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -130,3 +130,62 @@ FROM kibana_sample_data_ecommerce
130
130
:alt: ESQL query with a custom time field enabled
131
131
:::
132
132
133
+
### Create and edit lookup indices from queries [discover-esql-lookup-join]
134
+
```{applies_to}
135
+
stack: preview 9.2
136
+
serverless: preview
137
+
```
138
+
139
+
In **Discover**, LOOKUP JOIN commands include interactive options that let you create or edit lookup indices directly from the editor.
140
+
141
+
#### Create a lookup index from the editor
142
+
143
+
You can create a lookup index directly from the ES|QL editor. To populate this index, you can type in data manually or upload a CSV file up to 500 MB.
144
+
145
+
To create lookup indices, you need the [`create_index`](elasticsearch://reference/elasticsearch/security-privileges.md#privileges-list-indices) {{es}} privilege on the corresponding pattern.
146
+
147
+
1. In your {{esql}} query, add a `LOOKUP JOIN` command. For example:
148
+
```esql
149
+
FROM kibana_sample_data_logs
150
+
| LOOKUP JOIN
151
+
```
152
+
Add a space after the command. The editor suggests existing lookup indices and offers to create one. You can also type an index name in your query. If it doesn't exist, the editor suggests to create it.
153
+
154
+
2. Select the **Create lookup index** suggestion that appears in the autocomplete menu.
155
+
156
+
3. Define a name for the lookup index, then validate it.
157
+
- It must not contain spaces nor any of the following characters: `\`, `/`, `*`, `?`, `<`, `>`, `|`, `:`, and `#`.
158
+
- It must not start with `-`, `_`, or `+`.
159
+
160
+
4. Provide the data of the lookup index. You can choose between:
161
+
-**Uploading a CSV file up to 500 MB**. When uploading a file, you can preview the data and inspect the file's content before it is imported. If issues are detected, a **File issues** tab with more details also appears before you validate the import.
162
+
-**Adding data manually**. To do that, you can add rows and columns, and edit cells directly.
163
+
-**Using a combination of both methods**. You can upload a file after adding data manually, and edit or expand data imported from a file.
164
+
165
+
:::{tip}
166
+
You can explore your index using the search field, or in a new Discover session by selecting **Open in Discover**. If you choose to open it in Discover, a new browser tab opens with a prefilled {{esql}} query on the index.
167
+
:::
168
+
169
+
5.**Save** any unsaved changes, then **Close** the index editor to return to your query.
170
+
171
+
Your new index is automatically added to your query. You can then specify the field to join using `ON <field_to_join>`.
172
+
173
+
#### View or edit a lookup index from the editor
174
+
175
+
You can view and modify existing lookup indices referenced in an {{esql}} query directly from the editor, depending on your privileges:
176
+
- To edit lookup indices, you need the [`write`](elasticsearch://reference/elasticsearch/security-privileges.md#privileges-list-indices) {{es}} privilege.
177
+
- To view lookup indices in read-only mode, you need the [`view_index_metadata`](elasticsearch://reference/elasticsearch/security-privileges.md#privileges-list-indices) {{es}} privilege.
178
+
179
+
To view or edit an index:
180
+
181
+
1. In the {{esql}} query, hover over the lookup index name.
182
+
183
+
2. Select the **Edit lookup index** or **View lookup index** option that appears. A flyout showing the index appears.
184
+
185
+
3. Depending on your permissions and needs, explore or edit the index.
186
+
187
+
:::{note}
188
+
Editing a lookup index affects all {{esql}} queries that reference it. Make sure that your changes are compatible with existing queries that use this index.
189
+
:::
190
+
191
+
4. If you made changes, select **Save** before closing the flyout.
Copy file name to clipboardExpand all lines: explore-analyze/query-filter/languages/esql-kibana.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -228,8 +228,11 @@ FROM kibana_sample_data_logs
228
228
229
229
The ES|QL editor supports [`LOOKUP JOIN`](elasticsearch://reference/query-languages/esql/commands/processing-commands.md#esql-lookup-join) commands and suggests lookup mode indices and join condition fields.
230
230
231
+
{applies_to}`stack: ga 9.2` You can also use lookup indices from your remote clusters.
232
+
231
233

232
234
235
+
In **Discover**, LOOKUP JOIN commands let you create or edit lookup indices directly from the editor. Find more information in [](/explore-analyze/discover/try-esql.md#discover-esql-lookup-join).
0 commit comments