Splunk® Data Stream Processor

Use the Data Stream Processor

On April 3, 2023, Splunk Data Stream Processor will reach its end of sale, and will reach its end of life on February 28, 2025. If you are an existing DSP customer, please reach out to your account team for more information.
This documentation does not apply to the most recent version of Splunk® Data Stream Processor. For documentation on the most recent version, go to the latest release.

Adding, removing, and updating fields

You can add, update, and remove fields with the Data Stream Processor.

Adding fields

To add a new top-level field to your data, use the Eval function. The Eval function adds or updates an existing field to your record.

  1. From the Data Pipelines editor, click on the + icon and add the Eval function to your pipeline.
  2. Enter the Eval expression that defines the field value.
    For example, to add a new field called "User" to your data that contains the value of host, type user=host in your eval function.
  3. With your Eval function highlighted, click Start Preview to verify that the expression is working as expected.

Updating fields

To manipulate an existing field, use the Eval function. The Eval function adds or updates an existing field to your record.

  1. From the Data Pipelines editor, click on the + icon and add the Eval function to your pipeline.
  2. Enter the Eval expression that defines the field value.
    For example, to append to the existing body field Price, type the following in your Eval function.
    body=concat("price=", cast(body, "string"))
  3. With your Eval function highlighted, click Start Preview to verify that the expression is working as expected.

Removing fields

Use the Fields function to only keep selected fields in your events or remove specific fields from your events.

  1. From the Data Pipelines Canvas view, click on the + icon and add the Fields function to your pipeline.
  2. If you want to only keep specific fields in your data, then:
    • In the Fields function, enter the fields you want to keep in your data in field_list. For example, to keep only the host and source fields, type host, source in the field_list .
  3. If you want to remove specific fields in your data, then:
    • In the Fields function, enter the fields you want to remove from your data in the field_list and type - in the operator field. For example, to remove the source field, type source in the field_list and - in the operator field.
  4. With your Fields function highlighted, click Start Preview to verify that the expression is working as expected.
Last modified on 28 September, 2020
Add a sourcetype   Extracting fields in events data

This documentation applies to the following versions of Splunk® Data Stream Processor: 1.1.0


Was this topic useful?







You must be logged into splunk.com in order to post comments. Log in now.

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters