This topic describes how to use the thru command in the Splunk Data Stream Processor.
Thru command is one of three special SPL2 commands, along with from and into, that indicate how a DSP function interacts with external data. Use the Thru command in conjunction with "Write Thru" functions. Write Thru functions are a type of streaming function that sends data to an external destination like most sink functions but also sends data to the next downstream function on the pipeline. Currently, the only DSP function that works with Thru is the Write thru KV Store function. You only need to explicitly invoke Thru with the Write Thru functions in the SPL2 builder.
...| thru kvstore_lookup_sink(lookup_dataset: "lookup_table", predicate: isnotnull('mymeta'), lookup_fields: ["id", "body", "metadata", "foo"], event_fields: ["id", "body", "mymeta", "foo"], mode: "append") | ...;
Write thru KV Store
This documentation applies to the following versions of Splunk® Data Stream Processor: 1.2.0, 1.2.1