Splunk Search

Remove fields from a query

kahless1985
Explorer

The title says it all. I'm looking for a way to remove fields from searches and subsearches. I know I can hide fields from results with

| fields - "fieldName"

But I'm looking for a way to get "set diff" to operate on a singe filed. If I was using "diff" without "set" the the attribute parameter could be utilized but unfortunately this option seems to be disabled when the two are used in conjunction.

0 Karma

mydog8it
Builder

Search in a stats count by type search and then only redirect the interesting fields to a table, the results will only be the fields you send to the table.
Does that help?

0 Karma

somesoni2
Revered Legend

What's your current search(es)?

0 Karma

msivill_splunk
Splunk Employee
Splunk Employee

Could you create an expanded example of the SPL perhaps using | makeresults to generate the data for a standalone example?

0 Karma
Get Updates on the Splunk Community!

Index This | What goes away as soon as you talk about it?

May 2025 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with this month’s ...

What's New in Splunk Observability Cloud and Splunk AppDynamics - May 2025

This month, we’re delivering several new innovations in Splunk Observability Cloud and Splunk AppDynamics ...

Getting Started with Splunk Artificial Intelligence, Insights for Nonprofits, and ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...