SPLK-1002 · Question #173
How is a macro referenced in a search?
The correct answer is C. By enclosing the macro name in backtick characters (`). In Splunk, macros are invoked by wrapping the macro name in backtick characters - for example, macroname. This tells the search processor to expand the macro definition inline before executing the search. Single quotes are used for string literals, not macros. There is no…
Question
How is a macro referenced in a search?
Options
- ABy using the macroname command.
- BBy using the macro command.
- CBy enclosing the macro name in backtick characters (`).
- DBy enclosing the macro name in single-quote characters (`).
How the community answered
(42 responses)- A5% (2)
- C93% (39)
- D2% (1)
Explanation
In Splunk, macros are invoked by wrapping the macro name in backtick characters - for example, macroname. This tells the search processor to expand the macro definition inline before executing the search. Single quotes are used for string literals, not macros. There is no dedicated macro or macroname command in SPL.
Topics
Community Discussion
No community discussion yet for this question.