Skip to main content

outputlookup

Description

Writes the search result to a table (or file) with the ability to update or append data. Supports parameter configuration for managing the writing and updating process.

Syntax

...| outputlookup <lookup-name>  [append=<bool>] [keyfield=<string>] [packsize=<int>] [nores=<bool>]

Required Arguments

ParameterSyntaxDescription
lookup-name<field>The name of the predefined lookup.

Optional Arguments

ParameterSyntaxDefaultDescription
appendappend=<bool>falsetrue — appends to existing data, false — overwrites existing data.
keyfieldkeyfield=<string>The field used to match records between the lookup table and the source data. Only documents with matching values in this field will be updated.
packsizepacksize=<int>100Defines how many records are updated simultaneously in the table. Works only in combination with keyfield. Used to manage load for large updates.
noresnores=<boolean>falseWhen set to true, clears the search results after writing to the lookup table.

Query Examples

Example #1
source radius_logs
| outputlookup my_lookup
Example #2
source internal_audit*
| aggs count, latest(audit_category) as audit_category by audit_node_host_address
| outputlookup hosts_categories keyfield=audit_node_host_address packsize=200 nores=true