Splunk Dev

how to display common results from two index

tp92222
Explorer

Hi,
i have 2 indexes
index=abc & index=xyz

Index abc has following values

ID.......Type Name class Address
001....A.......Tejas....12A...India
002....A.......Jhon.....11A...USA
003....B.......Tom......11A...UK
004....C.......Ram......12B...India
004....A.......Ron......12B...UAE

Index XYZ has following values

ID.......Type Name class Address
001....A.......Tejas....12A...India
002....A.......Jhon.....11A...USA
004....D.......Ram......12B...India
004....A.......Ron......12B...UAE

It should return result where exact match found in both index for ID AND Type

Desired result

001....A.......Tejas....12A...India
002....A.......Jhon.....11A...USA
004....A.......Ron......12B...UAE

Thank you

Tags (1)
0 Karma
1 Solution

jkat54
SplunkTrust
SplunkTrust

index=abc [search index=xyz | dedup ID Type | fields ID Type]

also

index=abc | join type=inner max=0 ID Type [search index=xyz]

View solution in original post

0 Karma

jkat54
SplunkTrust
SplunkTrust

index=abc [search index=xyz | dedup ID Type | fields ID Type]

also

index=abc | join type=inner max=0 ID Type [search index=xyz]

0 Karma

tp92222
Explorer

Thanks for help

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...