Splunk Search

Compare value of row'1', column'1' with row'n', column'n' and if matched then diff=(Size_In_MB_new-Size_In_MB)

RajanRaj
New Member

I want to compare (OWNER)(TABLE_NAME) to (OWNER_New)(TABLE_NAME_New). And once the value matched then want to find difference between  Size_In_MB_new and Size_In_MB.

Catch is i do not want to only compare the value of (OWNER)(TABLE_NAME) in same row, i want it to search for the same value in all row of (OWNER_New)(TABLE_NAME_New) and if match found then perform difference of desired fields.

 

OWNERTABLE_NAMESize_In_MBOWNER_NewTABLE_NAME_NewSize_In_MB_New
MZOWNERSYSTEM_LOG121620RB_CUSTOMIPGINVOICETRANSACTIONARCHIVE158115
GENEVA_ADMINIPGEMSV5US89920MZOWNERSYSTEM_LOG121620
GENEVA_ADMINIPGEMSV7US53696GENEVA_ADMINIPGEMSV5US89920
GENEVA_ADMINEVENTMAPPINGSETVALUE38656GENEVA_ADMINIPGEMSV7US53696
GENEVA_ADMINIPGEMSV5GB14528GENEVA_ADMINEVENTMAPPINGSETVALUE38720
RB_CUSTOMIPGINVOICEGROUPARCHIVE13414RB_CUSTOMIPGNONINVOICETRANARCHIVE31617
GENEVA_ADMINIPGEMSV7GB12352GENEVA_ADMINIPGEMSV5GB14528
GENEVA_ADMINIPGEMSV7IT11712RB_CUSTOMIPGINVOICEGROUPARCHIVE13606
GENEVA_ADMINIPGEMSV7MY10688GENEVA_ADMINIPGEMSV7GB12352
GENEVA_ADMINCUSTPRODUCTCHARGE10378GENEVA_ADMINIPGEMSV7IT11712
Tags (1)
0 Karma

spitchika
Path Finder
 

Try this way, it works as I am using similar joins.

Fields names in both tables should be same otherwise rename them using "rename " command

index=abc source=abc
| join type=inner owner,table_name [ search index=xyz source=xyz
| stats Size_In_MB_New]
| stats owner,table_name,Size_In_MB,Size_In_MB_New
| eval DiffSize= Size_In_MB -Size_In_MB_New

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to January Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...

[Puzzles] Solve, Learn, Repeat: Reprocessing XML into Fixed-Length Events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...