Splunk Search

isuue with inputlookup file to expand multi values

james_n
Path Finder

Hi Experts,

I have a inputlookup file which consists of two fields i,e _time and names fields as shown below,

_time names
02/02/2020 user1
user2
08/02/2020 user1
user2
user3
10/02/2020 user2

I want to expand multi value filed i.e, names filed and show unique users list based on time, i tried |inputlookup filename.csv |stats values(names) as name |mvexpand name |dedup name |table name| sort - name but not worked for me,.
Please help on this, Thanks in advance.

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@james_n

Are you looking for this?

| inputlookup filename.csv | rex mode=sed "s/(\n)/,/g" field=names | eval names=split(names,",") | stats values(names) as name by _time
0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...