On October 30, 2022, all 1.2.x versions of the Splunk Data Stream Processor will reach its end of support date. See the Splunk Software Support Policy for details.
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.
- From the Data Pipelines Canvas view, click the + icon and add the Fields function to your pipeline.
- 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 .
- 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
- 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, typesource
in the field_list and-
in the operator field.
- In the Fields function, enter the fields you want to remove from your data in the field_list and type
- 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
Masking sensitive data in the | Filtering and routing data in the |
This documentation applies to the following versions of Splunk® Data Stream Processor: 1.2.0, 1.2.1-patch02, 1.2.1, 1.2.2-patch02, 1.2.4, 1.2.5
Feedback submitted, thanks!