Other Usage

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!

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 ...