Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam SPLK-1002 topic 1 question 34 discussion

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

A user wants to convert numeric field values to strings and also to sort on those values.
Which command should be used first, the eval or the sort?

  • A. It doesn't matter whether eval or sort is used first.
  • B. Convert the numeric to a string with eval first, then sort.
  • C. Use sort first, then convert the numeric to a string with eval.
  • D. You cannot use the sort command and the eval command on the same field.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
oksey
Highly Voted 3 years, 7 months ago
Use sort first, then convert the numeric to a string with eval. C
upvoted 17 times
...
mybox1
Highly Voted 3 years, 4 months ago
To order numerically, first sort, then use eval - page 107
upvoted 12 times
MxQ3
1 year, 9 months ago
This is correct
upvoted 1 times
...
...
jsk46
Most Recent 6 months, 2 weeks ago
B and C return the same result so the correct anws is A
upvoted 1 times
...
mohanmk95
11 months ago
Selected Answer: C
need to be sort out in numeric format only
upvoted 1 times
...
Harrysa
11 months, 1 week ago
C is wrong becasue If you use the sort command first and then the eval command, you need to ensure that the sort command is sorting the values in the desired way (i.e., as strings rather than numerically), and you need to use the str function within the sort command to force it to treat the values as strings. This can make the command more complicated and increase the likelihood of errors.
upvoted 2 times
...
solomone
11 months, 3 weeks ago
Selected Answer: C
Sort numerically first always.
upvoted 1 times
...
TestingAccount900
1 year, 6 months ago
Selected Answer: C
C is correct
upvoted 1 times
...
jdestinoble
1 year, 7 months ago
Selected Answer: C
C is correct
upvoted 1 times
...
Nicker9
1 year, 8 months ago
You have to sort first and then convert to a string. So Answer C.
upvoted 1 times
...
emlch
1 year, 9 months ago
If you convert to a string first you will have this kind of ordenation: 1, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21...
upvoted 4 times
...
fsanchezs
1 year, 11 months ago
Selected Answer: C
The answer is C
upvoted 1 times
...
[Removed]
1 year, 11 months ago
Answer is C, sort first. Always.
upvoted 1 times
...
RoVasq3
2 years ago
Selected Answer: C
Answer is C
upvoted 2 times
...
SasnycoN
2 years, 4 months ago
I think it's A as It doesn't matter if you are soring before or after as they are all numeric fields and the resutls will be the same.
upvoted 2 times
...
teems5uk
2 years, 6 months ago
Fun2(page ) justifies option C
upvoted 1 times
...
mikey_76
2 years, 6 months ago
the logical answer is C, sorting the numbers first and then converting to string. However the wording of the questions make it sound like they want to convert first and then sort alphanumerically so B is the answer. The wording on the question needs to be more clear
upvoted 2 times
...
Bianchi
2 years, 7 months ago
Why would you sort values in an alpha-numeric way? that's not logit, that said, you sort first, then eval. Fund 2 Page 104 (c) sort first then eval
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 ...