exam questions

Exam SPLK-1002 All Questions

View all questions & answers for the SPLK-1002 exam

Exam SPLK-1002 topic 1 question 172 discussion

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

Which of the following eval commands will provide a new value for host from src if it exists?

  • A. | eval host * if(isnull(src), src, host)
  • B. | eval host = if(src = host, src, host)
  • C. | eval host = if(NOT src = host, src, host)
  • D. | eval host = if(isnotnull(src), src, host)
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
ismailwale
3 weeks, 4 days ago
Selected Answer: D
D is correct: Explanation: A. | eval host * if(isnull(src), src, host): This is incorrect syntax. The * operator is not appropriate for updating the host field based on the condition. B. | eval host = if(src = host, src, host): This would leave host unchanged if src is equal to host. It does not provide a new value from src. C. | eval host = if(NOT src = host, src, host): This would replace host with src only if src is not equal to host, but not specifically provide a new value from src if it exists. D. | eval host = if(isnotnull(src), src, host): This is correct. It sets host to the value of src if src is not null; otherwise, it keeps the original value of host. Therefore, the correct answer is D. | eval host = if(isnotnull(src), src, host).
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