tenzir / public-roadmap

The public roadmap of Tenzir
https://docs.tenzir.com/roadmap
4 stars 0 forks source link

Lookup Operator for Contexts #122

Closed dominiklohmann closed 9 months ago

dominiklohmann commented 10 months ago

The lookup operator is the second operator next to enrich that utilizes contexts. It does live- and retro-lookups with a context against the node's storage.

Image

Contexts gain a new (optional) capability to provide a feed of expressions from updates. For contexts that support this option, the lookup operator additionally supports retro-matching.

Lookup subscribes to new partitions from the catalog, and uses a context for enriching and filtering. Lookup queries the catalog for old partitions with the expressions provided by the context, and uses a context for enriching and filtering.

The syntax for the lookup operator matches the syntax of the enrich operator. For example, for a lookup-table context, the following syntax applies:

lookup [--retro] [--live] [field=]<context> [<options>...]

By default, both retro and live lookups are enabled. Specifying either --retro or --live explicitly disables the other. Specifying both leaves both enabled.

### Definition of Done
- [x] Implement the `lookup` operator