Dashboards & Visualizations

Help needed in collating two lookup data

Saurabh_S
Engager

I have two lookup user.csv and roles.csv, I'm trying to collate both tables and make a table which shows indexname and username which are using these index. It's getting difficult for me to get accurate data as "splunk_user" is common for all the username and it shows up while I run below query - 
|inputlookup user.csv | lookup roles.csv roles outputnew indexes | table indexes , username

Can someone please help in getting this query right? OR any alternate solution to find all the index and users using those index.

user.csv - "splunk_user" is common for all the username.

username,roles
abc,"splunk_user index2_user"
def,"splunk_user"
xyz,"splunk_user index1_power"
klm,"splunk_user"
pqr,"splunk_user index2_power"

 

roles.csv

roles,indexes
"splunk_user","index_all index_3 index_4 index_5"
"index1_user","index_1"
"index1_power","index_1"
"index2_user","index_2"
"index2_power","index_2"

Labels (2)
0 Karma
1 Solution

renjith_nair
Legend

Try this

|inputlookup users.csv|makemv roles|mvexpand roles|lookup roles.csv roles OUTPUT indexes|stats values(indexes)  by username
---
What goes around comes around. If it helps, hit it with Karma 🙂

View solution in original post

renjith_nair
Legend

Try this

|inputlookup users.csv|makemv roles|mvexpand roles|lookup roles.csv roles OUTPUT indexes|stats values(indexes)  by username
---
What goes around comes around. If it helps, hit it with Karma 🙂

Saurabh_S
Engager

@renjith_nair Thanks for the quick help.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Painting a Clearer Picture: Creating Cross-Domain Visibility with AI Canvas

    Thursday, June 25, 2026  |  11AM PDT / 2PM EDT  Duration: 1 Hour (Includes live Q&A) Register to ...

Analytics Workspace deprecation

As of Splunk Cloud Platform 10.4.2604 and Splunk Enterprise 10.4, Analytics Workspace is now deprecated. ...

Splunk Developer Day Recap: Building, Publishing, and Growing on the Splunk Platform

Splunk Developer Day brought the Splunk developer community together for a practical look at what it means to ...