update
Updates a context with new data.
Description
The context::update
operator adds new data to a specified context.
Use the key
argument to specify the field in the input that should be
associated with the context. The context::enrich
operator uses
this key to access the context. For contexts that support assigning a value with
a given key, you can provide an expression to customize what's being associated
with the given key.
The three arguments create_timeout
, write_timeout
, and read_timeout
only
work with lookup tables and set the respective timeouts per table entry.
name: string
The name of the context to update.
key = any
The field that represents the enrichment key in the data.
value = any (optional)
The field that represents the enrichment value to associate with key
.
Defaults to this
.
create_timeout = duration (optional)
Expires a context entry after a given duration since entry creation.
write_timeout = duration (optional)
Expires a context entry after a given duration since the last update time. Every
Every call to context::update
resets the timeout for the respective key.
read_timeout = duration (optional)
Expires a context entry after a given duration since the last access time.
Every call to context::enrich
resets the timeout for the respective key.
Examples
Populate a lookup table with data
Create a lookup table:
Add data to the lookup table via context::update
:
Retrieve the lookup table contents:
Use a custom value as lookup table
See Also
context::create_bloom_filter
,
context::create_geoip
,
context::create_lookup_table
,
context::enrich
,
context::inspect
,
context::list
,
context::load
,
context::remove
,
context::reset
,
context::save