Courseiva
Advanced Searching and StatisticseasyMultiple ChoiceObjective-mapped

SPLK-1002 Advanced Searching and Statistics Practice Question

Which command creates a new field that contains the string 'high' if a numeric field exceeds 100, otherwise 'low'?

⚠ Common exam trap

Splunk often tests the requirement to quote string literals in `eval` expressions, and the trap here is that candidates may forget to quote the string values 'high' and 'low', treating them as field names instead of literal strings.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

eval status=if(value>100,"high","low")

The `eval` command with the `if` function correctly checks if the numeric field `value` exceeds 100 and returns the string 'high' or 'low'. In Splunk's `eval`, the `if` function requires the true and false results to be quoted strings when they are literal text, as shown in option A.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • eval status=if(value>100,"high","low")

    Why this is correct

    Correct syntax with quoted strings.

  • eval status=case(value>100,"high",true(),"low")

    Why it's wrong here

    Works but not the best practice; case is for multiple conditions.

  • eval status=if(value>100,high,low)

    Why it's wrong here

    Missing quotes on strings.

  • None of the above

    Why it's wrong here

    Option A is correct.

About these practice questions

This SPLK-1002 question is part of Courseiva's 475-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SPLK-1002 practice question is part of Courseiva's free Splunk certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SPLK-1002 exam.