Splunk Search

Club results from multiple search in a single table.Search involves dedup and count by parameter

arunsubram
Explorer

index=* activatesessionIdsForREST() : partnerId=11111111111 ActivateOfferRequestVO |dedup sessionIds|stats count(sessionIds) as SessionCount by partnerId append [search index=* activatesessionIdsForREST() : partnerId=22222222222 ActivateOfferRequestVO |dedup sessionIds|stats count(sessionIds) as SessionCount by partnerId]

Above is my query
I am looking for a table like
PartnerId SessionCount
11111111111 10
22222222222 20

When I run the first query, I get the result separately
index=* activatesessionIdsForREST() : partnerId=11111111111 ActivateOfferRequestVO |dedup sessionIds|stats count(sessionIds) as SessionCount by partnerId append

I get
PartnerId SessionCount
11111111111 10

but when I append the second query, I dont get results. Appreciate any suggestion

Tags (1)
0 Karma
1 Solution

gyslainlatsa
Motivator

hi,

If you want to use the append command, use the pipe | before like this:

 index= activatesessionIdsForREST() : partnerId=11111111111 ActivateOfferRequestVO  |dedup sessionIds |stats count(sessionIds)    as SessionCount by partnerId 
|append  [search index=activatesessionIdsForREST() : partnerId=22222222222 ActivateOfferRequestVO 
 |dedup sessionIds|stats count(sessionIds) as SessionCount by partnerId]

View solution in original post

0 Karma

gyslainlatsa
Motivator

hi,

If you want to use the append command, use the pipe | before like this:

 index= activatesessionIdsForREST() : partnerId=11111111111 ActivateOfferRequestVO  |dedup sessionIds |stats count(sessionIds)    as SessionCount by partnerId 
|append  [search index=activatesessionIdsForREST() : partnerId=22222222222 ActivateOfferRequestVO 
 |dedup sessionIds|stats count(sessionIds) as SessionCount by partnerId]
0 Karma

gyslainlatsa
Motivator

thanks, don't forget to vote.

0 Karma
Get Updates on the Splunk Community!

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...

Integrating Splunk Search API and Quarto to Create Reproducible Investigation ...

 Splunk is More Than Just the Web Console For Digital Forensics and Incident Response (DFIR) practitioners, ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...