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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...