Splunk Search

Can I do a wildcard search in a CSV file to get a list of all field names?

ttudor
Explorer

I want to get a list of all the field names in an oracle.csv file. I generally do something like:
"[inputlookup oracle.csv
| where like(DISTRICT_NAME,"school example%") AND like(DISTRICT_STATE,"TX") AND ACTIVE_STATUS=1 | lookup search_schid2uuid school_id OUTPUT sch_id
| return 50 sch_id]"

Can I just do a wildcard search to get a list of field names?

0 Karma
1 Solution

lguinn2
Legend

You could just do this

| inputlookup oracle.csv
| fieldsummary maxvals=10

You might even want to follow that with the fields command to get rid of the columns that don't interest you.

View solution in original post

lguinn2
Legend

You could just do this

| inputlookup oracle.csv
| fieldsummary maxvals=10

You might even want to follow that with the fields command to get rid of the columns that don't interest you.

ttudor
Explorer

Worked great thank you

0 Karma
Get Updates on the Splunk Community!

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...