SPLK-1001 · Question #166
Which command will rename action to Customer Action?
The correct answer is D. | rename action as "Customer Action". Option D is correct because Splunk SPL's rename command requires the keyword as to map old names to new names, and the original field name action must match exactly - SPL field names are case-sensitive, so lowercase action is required. The new name "Customer Action" must be…
Question
Which command will rename action to Customer Action?
Options
- A| rename action = CustomerAction
- B| rename Action as "Customer Action"
- C| rename Action to "Customer Action"
- D| rename action as "Customer Action"
How the community answered
(25 responses)- A16% (4)
- B4% (1)
- C8% (2)
- D72% (18)
Explanation
Option D is correct because Splunk SPL's rename command requires the keyword as to map old names to new names, and the original field name action must match exactly - SPL field names are case-sensitive, so lowercase action is required. The new name "Customer Action" must be quoted because it contains a space.
- A fails on two counts: it uses
=instead ofas, andCustomerActionis missing the space (and quotes) that the target name requires. - B uses
ascorrectly and quotes the new name, but capitalizesAction- this won't match the lowercase fieldactiondue to case sensitivity. - C uses the wrong keyword
toinstead ofas, and also capitalizesActionincorrectly.
Memory tip: Think of SPL rename like an alias in plain English - "rename this as that" - and remember that SPL field names are case-sensitive, so copy the field name exactly as it appears.
Community Discussion
No community discussion yet for this question.