Splunk® Data Stream Processor

Use the Data Stream Processor

Acrobat logo Download manual as PDF


Acrobat logo Download topic as PDF

Remove unwanted fields from your data

The allows you to remove fields that you are uninterested in before sending your data to a destination. There are a number of different functions that allow you to remove fields from your data, and the one that you choose depends on your specific data. The following example uses the Fields function, but you can also use string manipulation or map scalar functions in conjunction with Eval or Select to remove fields.

Example: Removing fields

In this example, we'll use the Fields function to only keep selected fields in your records or remove specific fields from your records.

  1. From the Data Pipelines Canvas view, click 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.

Remove nested fields

To learn how to remove nested fields, see step 3 in Extract a nested map from one field and add it to another field.

See also

Functions
Fields
Eval
Select
string manipulation
map
Related topics
Working with nested data
Last modified on 20 May, 2021
PREVIOUS
Masking sensitive data in the
  NEXT
Filtering and routing data in the

This documentation applies to the following versions of Splunk® Data Stream Processor: 1.2.0, 1.2.1


Was this documentation topic helpful?

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