Skip to content

Commit 3915d33

Browse files
ESQL: Add reference entry for LOOKUP JOIN (#210201)
I couldn't verify if this builds correctly, as I couldn't quickly whip up a dev environment locally that could build this. Is there a preview built by the CI? --------- Co-authored-by: Stratoula Kalafateli <[email protected]>
1 parent 8ce4eef commit 3915d33

File tree

4 files changed

+54
-3
lines changed

4 files changed

+54
-3
lines changed

src/platform/packages/private/kbn-language-documentation/src/sections/esql_documentation_sections.tsx

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,10 +397,61 @@ FROM employees
397397
/>
398398
),
399399
},
400+
{
401+
label: i18n.translate('languageDocumentation.documentationESQL.lookupJoin', {
402+
defaultMessage: 'LOOKUP JOIN',
403+
}),
404+
preview: true,
405+
description: (
406+
<Markdown
407+
openLinksInNewTab={true}
408+
markdownContent={i18n.translate(
409+
'languageDocumentation.documentationESQL.lookupJoin.markdown',
410+
{
411+
defaultMessage: `### LOOKUP JOIN
412+
You can use \`LOOKUP JOIN\` to add data from an existing index to incoming rows. While this is similar to \`ENRICH\`, it does not require an enrich policy to be executed beforehand. Additionally, if multiple matching documents are found in the lookup index, they will generate multiple output rows.
413+
414+
\`\`\`
415+
ROW language_code = 1
416+
| LOOKUP JOIN languages ON language_code
417+
\`\`\`
418+
419+
An index that is used in \`LOOKUP JOIN\` needs to be in lookup mode. To create a lookup index, set the index mode to lookup.
420+
421+
\`\`\`
422+
PUT languages
423+
'{
424+
"settings": {
425+
"index":{
426+
"mode":"lookup"
427+
}
428+
}
429+
}'
430+
\`\`\`
431+
432+
The join key field must have a compatible type and match the name of the field in the lookup index to find matching documents. You can use \`RENAME\` or \`EVAL\` to rename columns as needed.
433+
434+
\`\`\`
435+
FROM employees
436+
| EVAL language_code = languages
437+
| LOOKUP JOIN languages ON language_code
438+
\`\`\`
439+
440+
In case of name collisions, the fields from the lookup index will override the existing fields.
441+
`,
442+
ignoreTag: true,
443+
description:
444+
'Text is in markdown. Do not translate function names, special characters, or field names like sum(bytes)',
445+
}
446+
)}
447+
/>
448+
),
449+
},
400450
{
401451
label: i18n.translate('languageDocumentation.documentationESQL.mvExpand', {
402452
defaultMessage: 'MV_EXPAND',
403453
}),
454+
preview: true,
404455
description: (
405456
<Markdown
406457
markdownContent={i18n.translate(

x-pack/platform/plugins/private/translations/translations/fr-FR.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46812,4 +46812,4 @@
4681246812
"xpack.watcher.watchEdit.thresholdWatchExpression.aggType.fieldIsRequiredValidationMessage": "Ce champ est requis.",
4681346813
"xpack.watcher.watcherDescription": "Détectez les modifications survenant dans vos données en créant, gérant et monitorant des alertes."
4681446814
}
46815-
}
46815+
}

x-pack/platform/plugins/private/translations/translations/ja-JP.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46663,4 +46663,4 @@
4666346663
"xpack.watcher.watchEdit.thresholdWatchExpression.aggType.fieldIsRequiredValidationMessage": "フィールドを選択してください。",
4666446664
"xpack.watcher.watcherDescription": "アラートの作成、管理、監視によりデータへの変更を検知します。"
4666546665
}
46666-
}
46666+
}

x-pack/platform/plugins/private/translations/translations/zh-CN.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45966,4 +45966,4 @@
4596645966
"xpack.watcher.watchEdit.thresholdWatchExpression.aggType.fieldIsRequiredValidationMessage": "此字段必填。",
4596745967
"xpack.watcher.watcherDescription": "通过创建、管理和监测警报来检测数据中的更改。"
4596845968
}
45969-
}
45969+
}

0 commit comments

Comments
 (0)