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!

Introducing the 2024 SplunkTrust!

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

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...