Splunk Search
Highlighted

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

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(DISTRICTNAME,"school example%") AND like(DISTRICTSTATE,"TX") AND ACTIVESTATUS=1 | lookup searchschid2uuid schoolid OUTPUT schid
| return 50 sch_id]"

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

0 Karma
Highlighted

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

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

Highlighted

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

Explorer

Worked great thank you

0 Karma