-
Notifications
You must be signed in to change notification settings - Fork 25.2k
ESQL: Lookup Join meta issue #116208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Pinging @elastic/es-analytical-engine (Team:Analytics) |
First PR for adding LOOKUP JOIN in ESQL. Introduces grammar and wires the main building blocks to execute a query; follow-ups are required (see #116208 for more details). Co-authored-by: Nik Everett <[email protected]>
First PR for adding LOOKUP JOIN in ESQL. Introduces grammar and wires the main building blocks to execute a query ; follow-ups are required (see elastic#116208 for more details). Co-authored-by: Nik Everett <[email protected]> (cherry picked from commit bc785f5)
First PR for adding LOOKUP JOIN in ESQL. Introduces grammar and wires the main building blocks to execute a query ; follow-ups are required (see #116208 for more details). Co-authored-by: Nik Everett <[email protected]> (cherry picked from commit bc785f5)
First PR for adding LOOKUP JOIN in ESQL. Introduces grammar and wires the main building blocks to execute a query; follow-ups are required (see elastic#116208 for more details). Co-authored-by: Nik Everett <[email protected]>
First PR for adding LOOKUP JOIN in ESQL. Introduces grammar and wires the main building blocks to execute a query; follow-ups are required (see elastic#116208 for more details). Co-authored-by: Nik Everett <[email protected]>
I have been monitoring this feature and looking forward to it's capabilities. I noticed this PR (elastic/kibana#207350) came down the pipeline and it made me wonder. For LOOKUP to be usable on multiple indices, does it require the indices that will be joined to have Lookup Index mode or is that just a more efficient way to perform the operation? I ask because I am trying to understand how the LOOKUP varies from some of the way that ENRICH works. It is painful today having to create Enrich policy after Enrich policy on the same dataset because you can only have 1 match field. One of many use cases is enriching data from 1 source with another. Let's say I have firewall logs with source.ip : 1.2.3.4, event.action : block, url.domain : bad.xyz and I want to join that with DHCP data around that same time with the host.ip : 1.2.3.4., host.name : computer1, I would want to combine this into a single row showing something like: This would allow for joining data in way to simplify outcomes of multiple data sources. Another use case is simply enriching without the need for enrich policies as stated above and just "enrich" using other indices ad-hoc. However, from what I have observed so far, there may be additional steps to perform this LOOKUP. Any additional details on what the goal here is with some examples could help understand what is to come. Thanks! |
The |
Thanks for the clarification! |
This feature is so important, for many of Enterprise customers like ours which are now exporting data outside Elastic to do the same. Can we have an example docs page to show the various abilities of these commands please? When we say 'lookup' join searchtime , it is broad statement (for instance we are really looking for joining with ANOTHER index). So the ability to do 'sub-search' is quite important too as part of lookup. Hence if we can update into a list or preview of Elastic v9.x somewhere please I can produce some list of lookup examples and update you for testing ? Thanks again |
Hi @getkub Lookup Join was released as Tech Preview in 8.18. Please check the announcement blog and the docs for more information. We are aware of the need for joining against any index and sub searches - both are on the future roadmap. |
Great progress.
|
Description
Meta ticket around the main implementation topics required for lookup join
add grammar / parser
LOOKUP JOIN
Make it execute correctly on data nodes, too, and enable csv tests
...OnTheDataNode
. See (reproducible) failed runs from ESQL: Fix lookup join output #117639 branch:ON
conditionrewrite into JOIN equi-joinmaybe laterON field
alias toUSING field
(syntax already used in enrich) - alternative is to deprecate this syntaxparent.subfield
& co.CSV tests (some suggestions to start with: Esql/lookup join grammar #116515 (comment))
FROM
Known bugs
PushDownAndCombineLimits
work forJoin
s ESQL: LookupJoin fails to push down limits #117698null
rows ESQL: LOOKUP JOIN produces additional null rows #117702preAnalyzeLookupIndices
asking for all the lookup index' fields all the time, c.f. Enhance LOOKUP JOIN csv-spec tests to cover more cases and fix several bugs found #117843 (comment)field resolution
clarify output order rules in case of common keys (join keys and columns with same names) for consistency
ON
, which is not a thing in SQL, and have it behave similar to ENRICH: join columns inON
remain in place, right hand side columns are added on the right (like ENRICH) and shadow any left hand side columns with conflicting names.Filter pushdown (on the left/main branch) - see ESQL: Push down filter passed lookup join #118410
Fetch only the required fields (relates to field extraction + fieldNames), resp. prune irrelevant lookup index fields from the plan. ESQL: Prune lookup join cols #118808
Look whether the LookupJoin output could be computed inside the class ESQL: Fix lookup join output #117639
Resolve lookup table mappings - LOOKUP JOIN using field-caps for field mapping #117246
Update verifier and add corresponding tests Esql/lookup join grammar #116515 (comment).
LOOKUP JOIN idx ON a == b AND to_upper(c) LIKE d
Enhance tests
Compute
Make field extractor work with LookupOperators (keep field extraction in one place)Bifurcate join operator/allow other operators between join and Lookup source (eval, filter, etc..)Align LookupJoin and LookupJoinExec - the first allows branching, the second does not.Update: decided to postpone all this until we either evolve the way we perform the actual lookup join, or allow more features like actual condition expressions.
Later
Maybe
The text was updated successfully, but these errors were encountered: