SPLK-1002 Exam QuestionsBrowse all questions from this exam

SPLK-1002 Exam - Question 91


In the following eval statement, what is the value of description if the status is 503? index=main | eval description=case(status==200, "OK", status==404, "Not found", status==500, "Internal Server Error")

Show Answer
Correct Answer: AC

In the given eval statement using the case function, the description field is assigned a value based on the condition of the status field. The conditions specified are for status codes 200, 404, and 500. Since the status is 503, none of the conditions are met. According to the documentation of the case function in Splunk, if no conditions are true, the function defaults to NULL. Therefore, the description field would contain no value.

Discussion

14 comments
Sign in to comment
mimi01Option: A
Mar 15, 2021

A. The description field would contain no value.

RayObbesOption: A
Apr 20, 2022

It's A as you can see in the example here: https://docs.splunk.com/Documentation/Splunk/8.1.1/SearchReference/ConditionalFunctions

nimanamiOption: A
Aug 10, 2021

answer is A, tested it on splunk version 7.2.7

Min_93Option: A
Jan 20, 2022

The description field would contain no value.

spl_consumerOption: A
Feb 23, 2022

The right answer is A, checked in lab.

IGoddard90Option: A
Mar 26, 2021

https://docs.splunk.com/Documentation/Splunk/8.1.1/SearchReference/ConditionalFunctions "The function defaults to NULL if none are true."

ArDeKuOption: D
Mar 14, 2021

D is correct

Hudda
Jul 13, 2021

could you pls confirm the final answer friends? A or D?

meggidoOption: B
Aug 4, 2021

B -> pg 119 "if no value, default replacement value is 0"

lilsem
Aug 6, 2021

Only with fillnull command. So it is A.

csgajavellyOption: A
Jan 9, 2022

The answer is "A". Please correct it.

arcswOption: A
Nov 9, 2022

Try it yourself

Dree_DoggOption: A
Aug 16, 2023

correct ans is A

Sankardevarajan1986Option: C
Dec 27, 2023

correct answer C Reference link https://docs.splunk.com/Documentation/Splunk/8.1.1/SearchReference/ConditionalFunctions

hohohahahaho
May 10, 2024

bruh...

9314c9aOption: A
Jun 10, 2024

| makeresults | eval status=503 | eval description=case(status==200, "OK", status==404, "Not found", status==500, "Internal Server Error")