exam questions

Exam SPLK-1002 All Questions

View all questions & answers for the SPLK-1002 exam

Exam SPLK-1002 topic 1 question 148 discussion

Actual exam question from Splunk's SPLK-1002
Question #: 148
Topic #: 1
[All SPLK-1002 Questions]

If there are fields in the data with values that are "" or empty but not null, which of the following would add a value?

  • A. | eval notNULL="" | fillnull value=0 notNULL
  • B. | eval notNULL = "" | nullfill value=0 notNULL
  • C. | eval notNULL = if(isnull(notNULL), "0"
  • D. | eval notNULL = if(isnull(notNULL), "0", notNULL)
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
NastyNutsu
2 weeks, 5 days ago
…|fillnull [value=<stirng>][field-list>] A is correct
upvoted 1 times
...
AbrahamA
3 months, 2 weeks ago
Selected Answer: A
The correct answer is D. | eval notNULL = "" fillnull value=0 notNULL Option A is incorrect because it is missing a comma between the "0" and the notNULL in the if function. The correct syntax for the if function is if (condition, true_value, false_value). Option B is incorrect because it is missing the false_value argument in the if function. The correct syntax for the if function is if (condition, true_value, false_value). Option C is incorrect because it uses the nullfill command, which only replaces null values, not empty strings. The nullfill command is equivalent to fillnull value=null. Option D is correct because it uses the eval command to assign an empty string to the notNULL field, and then uses the fillnull command to replace the empty string with a zero. The fillnull command can replace any value with a specified replacement, not just null values.
upvoted 2 times
AbrahamA
3 months, 2 weeks ago
mod please delete, i i wrote the wrong explanation but it's A
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago