Reporting

How to combine the result of 2 search queries

Hadad
Engager

I'm trying to combine 2 CSV files, where:

- test-ad has the field "EmailAddress" and "Enabled";
- "Composição das tribos - Relação funcionários.csv") has the field "email" and "rh_status";

So, i can't combine the results:

index="teste-ad" OR (index="tst-compliance" AND source="Composição das tribos - Relação funcionários.csv")
| eval em=coalesce(EmailAddress,email)
| table em Enabled rh_statusa.png

Labels (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

The results are combined, but they need to be merged.  Use the stats command for that.

index="teste-ad" OR (index="tst-compliance" AND source="Composição das tribos - Relação funcionários.csv")
| eval em=coalesce(EmailAddress,email)
| stats values(*) as * by em
| table em Enabled rh_status

 

---
If this reply helps you, Karma would be appreciated.

View solution in original post

Hadad
Engager

Thank you so much.

0 Karma

richgalloway
SplunkTrust
SplunkTrust

The results are combined, but they need to be merged.  Use the stats command for that.

index="teste-ad" OR (index="tst-compliance" AND source="Composição das tribos - Relação funcionários.csv")
| eval em=coalesce(EmailAddress,email)
| stats values(*) as * by em
| table em Enabled rh_status

 

---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Take the 2021 Splunk Career Survey for $50 in Amazon Cash

Help us learn about how Splunk has impacted your career by taking the 2021 Splunk Career Survey. Last year’s ...

Using Machine Learning for Hunting Security Threats

WATCH NOW Seeing the exponential hike in global cyber threat spectrum, organizations are now striving more for ...

Observability Newsletter Highlights | March 2023

 March 2023 | Check out the latest and greatestSplunk APM's New Tag Filter ExperienceSplunk APM has updated ...