nerdexam
Splunk

SPLK-1002 · Question #186

What are the expected results for a search that contains the command | where A=B?

The correct answer is C. Events where values of field are equal to values of field B. The where command in Splunk evaluates Boolean expressions and keeps only events where the expression is true. Unlike the main search bar where field=value treats the right side as a string literal, in the where command A=B treats both A and B as field names and compares their…

Filtering and Grouping Results

Question

What are the expected results for a search that contains the command | where A=B?

Options

  • AEvents that contain the string value where A=B.
  • BEvents that contain the string value A=B.
  • CEvents where values of field are equal to values of field B.
  • DEvents where field A contains the string value B.

How the community answered

(41 responses)
  • A
    2% (1)
  • B
    2% (1)
  • C
    90% (37)
  • D
    5% (2)

Explanation

The where command in Splunk evaluates Boolean expressions and keeps only events where the expression is true. Unlike the main search bar where field=value treats the right side as a string literal, in the where command A=B treats both A and B as field names and compares their values. So | where A=B returns events where the value of field A equals the value of field B. To compare a field to a string literal in the where command, you would need quotes: | where A="B".

Topics

#where command#filtering#field comparison#SPL

Community Discussion

No community discussion yet for this question.

Full SPLK-1002 Practice