Splunk Search

How to query two nullable nested fields are not equal? [newbie question]

roliu
New Member

Hi, 

I have a dataset like below

 

 

[
  {classificationA: null, classificationB: null},
  {classificationA: {name: 'Education'}, classificationB: {name: 'Education'}},
  {classificationA: {name: 'IT'}, classificationB: {name: 'IT'}}
} 

 

 

My aim is to find all the rows whose classificationA is not equals to classificationB. So given the above dataset, it should return zero rows.

I thought it should be:

 

 

 | where classficationA != classficationB

 

 

But it is not working.  Anyone can help? Thank you!

Labels (2)
0 Karma

bowesmana
SplunkTrust
SplunkTrust

Is that your 'raw' data - it is not valid JSON. Is that a single event or 3 events?

Please share the raw data - if it's 3 classifications inside a single event, then please paste an example of the true _raw element of the value of a field that's extracted

 

0 Karma
Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Dynamic formatting from XML events

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

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...