Skip to content

[Feature] Support graphlookup as a top-level PPL command #5243

@qianheng-aws

Description

@qianheng-aws

Is your feature request related to a problem?
Currently, graphlookup can only be used as a piped command following another source-providing command (e.g., source=... | graphlookup ...), where startWith is resolved from the piped input.

This proposal adds support for graphlookup as a top-level PPL command (i.e., as the first command in a query without requiring source=). In this mode, the startWith option accepts either a single literal value or a list of literal values to seed the graph traversal. It will get simpler on syntax and also more execution efficiency for there common graph search cases where the start value is already know as a literal.

Current syntax (pipe-only)

source = employees | graphLookup employees start=reportsTo edge=reportsTo-->name as reportingHierarchy

Proposed extended syntax (top-level, no source required)

graphLookup employees start="Jack" edge=reportsTo-->name as reportingHierarchy
graphLookup employees start=("Jack", "Eliot") edge=reportsTo-->name as reportingHierarchy

What solution would you like?
A clear and concise description of what you want to happen.

What alternatives have you considered?
A clear and concise description of any alternative solutions or features you've considered.

Do you have any additional context?
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions