Exam SPLK-1002 All QuestionsBrowse all questions from this exam
Question 104

Given the following eval statement:

... | eval field1 = if(isnotnull(fieid1),field1,0), field2 = if(isnull

Which of the following is the equivalent using fillnull?

    Correct Answer: A

    The given eval statement checks if 'field1' is not null and assigns it to 'field1' or assigns 0 if it is null, and it checks if 'field2' is null and assigns 'no-value' or keeps 'field2' otherwise. The 'fillnull' command is used to replace null values in specified fields with specified values. However, the logic in the eval statement includes conditions that cannot be directly translated to a fillnull command, especially with mixed data types and specific conditions on multiple fields. Therefore, there is no equivalent expression using 'fillnull'.

Discussion
cansu91Option: A

What ist the right answer? I selected A but I'm not sure.

Amish0123Option: C

Tested .. Answer is C

poubellelc66

C can't work as there is a ' after the pipe that is not closed

The_LuciferOption: D

why not D?

Dree_DoggOption: A

I'd go with A. The question has a bad eval statement.

NetworkingGuy2Option: A

I would say probably A, the current search is probably meant to be: | eval field1 = if(isnotnull(fieid1),field1,0), field2 = if(isnull,field2, "NO VALUE") Thus, the first part which is asking if field1 isnotnull eg 104, then make that value 0. Points me to A, as no fillnull command or option here can do this step.