Splunk Certified Cybersecurity Defense Analyst free question 8 / 10 · Domain 5: SPL and Efficient Searching
An eval command that changes the time labeling of events comes right before transaction in a search. What does the documentation say the analyst must do?
- Add a dedup command immediately before transaction to remove the reordered events
- Move the transaction command to the end of the search, after the reporting commands
- Change the transaction to a stats command and keep the events in ascending order
- Add a sort command immediately before transaction to restore descending chronological order
Show the answer and explanation
Answer: D
Why this is correct
The usage notes on transaction state that the command requires incoming events to be in descending chronological order. Some commands, such as eval, might change the order or the time labeling of events. If one of these commands precedes transaction, the search returns an error unless a sort command is included. The sort must occur immediately before the transaction command to reorder the results in descending time order. The maxspan and maxpause limits also rely on this order being in place before they are applied.
Why the other options are wrong
"Add a dedup command immediately before transaction to remove the reordered events" … dedup removes duplicates. It does not restore the order of events.
"Move the transaction command to the end of the search, after the reporting commands" … Position at the end does not restore order. The page says to place a sort immediately before the command.
"Change the transaction to a stats command and keep the events in ascending order" … The page does not describe this switch. It describes sorting the events before the transaction command.
Key points
transaction needs events in descending time order. After eval-like commands, add a sort right before it.