Splunk Search

How to remove columns from search results table?

halkelley
Path Finder

This question was asked before, but not really answered. I have a search that returns columns dynamically created so I don't know the specific column/field names to include, but I do know the columns/fields that I need to remove so the graph will total and display properly. Is there a way to remove those columns?

Tags (3)
1 Solution

pradeepkumarg
Influencer

Are you looking for fields command?

Remove the "host" and "ip" fields.

... | fields - host, ip

More information in this link

http://docs.splunk.com/Documentation/Splunk/6.1.3/SearchReference/Fields

View solution in original post

Akbari
New Member

Table Name:TempDay
Filed Name: AttendanceDate
Code:
Dim curDatabase As DAO.Database
Dim tblPersons As DAO.TableDef
Set curDatabase = CurrentDb
Set TempDay = curDatabase.TableDefs("TempDay")
DoCmd.RunSQL "ALTER TABLE TempDay DROP COLUMN AttendanceDate"
‘For deleting more than one column try below
DoCmd.RunSQL "ALTER TABLE TempDay DROP COLUMN Second Column Name"
DoCmd.RunSQL "ALTER TABLE TempDay DROP COLUMN Third Column Name"

0 Karma

linu1988
Champion

the question is not that clear but you can always use |fields -col1,col2 to remove the column. There is no harm if they don't exist as well..

pradeepkumarg
Influencer

Are you looking for fields command?

Remove the "host" and "ip" fields.

... | fields - host, ip

More information in this link

http://docs.splunk.com/Documentation/Splunk/6.1.3/SearchReference/Fields

stufty
Path Finder

very useful - thank you

0 Karma

pradeepkumarg
Influencer

You're welcome 🙂

0 Karma

halkelley
Path Finder

thanks! I didn't realize fields had a "-" option!

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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