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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...