source="testing.csv" host="so1" index="test_csv" sourcetype="test_csv" | rex "(?<Test_ID>\d+),(?<name>.*)" max_match=0 | table Test_ID,name 1. source="testing.csv" host="so1" index="test_csv" sourcetype="test_csv" - This is just searching for a particular index, source, sourcetype. 2. | rex "(?<Test_ID>\d+),(?<name>.*)" max_match=0 - rex - It extracts fields inline from the events. The field extraction is not permanent. https://docs.splunk.com/Documentation/SplunkCloud/9.0.2305/SearchReference/Rex "(?<Test_ID>\d+),(?<name>.*)" - It is regular expression as per my sample data. Try https://regex101.com/ for building the regex as per your data. max_match=0 - It will allow rex command to match all matching field-values. Otherwise rex will only match the first occurrence.
... View more