The correct answer is that the 'like' function returns zero results due to case sensitivity and hidden spaces in the field values. This happens because Splunk’s 'like' operator performs exact, case-sensitive pattern matching using SQL-style wildcards, where '%' must be used to match any sequence of characters. If the lookup file contains 'admin1' and 'admin2', but the field values have leading or trailing spaces—such as ' admin1'—or the case differs, like 'Admin1' versus 'admin1', the pattern "admin%" will fail to match, resulting in zero results. On the SPLK-1003 exam, this question tests your understanding of common 'like function pattern matching issues', often appearing as a trap where candidates overlook default case sensitivity or forget that Splunk does not automatically trim spaces. A quick memory tip: think of 'like' as a strict librarian—it sees every space and capital letter, so always use 'trim()' and 'lower()' with your patterns to avoid empty results.
SPLK-1003 Advanced Searching and Statistics Practice Question
This SPLK-1003 practice question tests your understanding of advanced searching and statistics. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
Exhibit
Refer to the exhibit.
| inputlookup user_roles.csv
| eval role=if(like(user, "admin%"), "admin", "user")
| search role=admin
| stats count by role
The search returns zero results, but the lookup file contains users with names like 'admin1', 'admin2'. What is the most likely reason?
Clue words in this question
Noticing these words before you look at the options changes how you read each choice.
Clue: "most likely"
Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The 'like' function requires a wildcard pattern with '%' but the field value may have leading/trailing spaces or the pattern is case-sensitive.
The 'like' function in Splunk uses SQL-style pattern matching where '%' matches any sequence of characters. If the lookup file contains 'admin1' and 'admin2', but the search uses 'like(role, "admin%")', leading/trailing spaces in the field values or case sensitivity (e.g., 'Admin1' vs 'admin1') would cause the pattern to fail, returning zero results. Option B correctly identifies this as the most likely reason because Splunk's 'like' is case-sensitive by default and does not trim spaces.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
✗
The lookup file is not in CSV format.
Why it's wrong here
If it were not CSV, inputlookup would error.
✓
The 'like' function requires a wildcard pattern with '%' but the field value may have leading/trailing spaces or the pattern is case-sensitive.
Why this is correct
like() is case-sensitive; also if user has spaces, pattern may not match.
Clue confirmation
The clue word "most likely" in the question point toward this answer.
Related concept
Read the scenario before looking for a memorised answer.
✗
The stats command only counts events where role=admin, but the role field is already filtered.
Why it's wrong here
The search command already filters role=admin, so stats count would show count of admin events.
✗
The search command runs before the eval command.
Why it's wrong here
The pipeline runs in order; eval happens before search.
Common exam traps
Common exam trap: answer the scenario, not the keyword
Splunk often tests the misconception that 'like' is case-insensitive or automatically handles spaces, leading candidates to overlook the need for explicit trimming or case normalization.
Trap categories for this question
Command / output trap
The search command already filters role=admin, so stats count would show count of admin events.
Detailed technical explanation
How to think about this question
Under the hood, Splunk's 'like' function uses a case-sensitive comparison by default, unlike the 'LIKE' operator in SQL which is often case-insensitive depending on collation. Leading/trailing spaces are not automatically trimmed, so 'admin1 ' (with a trailing space) would not match 'admin%'. In real-world scenarios, data ingestion often introduces whitespace from CSV files or user input, making this a common pitfall. Using 'trim(role)' or converting to lowercase with 'lower(role)' before the 'like' comparison can resolve these issues.
KKey Concepts to Remember
Read the scenario before looking for a memorised answer.
Find the constraint that changes the correct option.
Eliminate answers that are true in general but not in this case.
TExam Day Tips
→Watch for words such as best, first, most likely and least administrative effort.
→Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A small business has 20 workstations on the 192.168.1.0/24 network and one public IP from its ISP. The router uses PAT (NAT overload) so all 20 devices share one public address using different source ports. NAT questions test whether you understand the four address terms and which direction each translation applies.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Advanced Searching and Statistics — This question tests Advanced Searching and Statistics — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: The 'like' function requires a wildcard pattern with '%' but the field value may have leading/trailing spaces or the pattern is case-sensitive. — The 'like' function in Splunk uses SQL-style pattern matching where '%' matches any sequence of characters. If the lookup file contains 'admin1' and 'admin2', but the search uses 'like(role, "admin%")', leading/trailing spaces in the field values or case sensitivity (e.g., 'Admin1' vs 'admin1') would cause the pattern to fail, returning zero results. Option B correctly identifies this as the most likely reason because Splunk's 'like' is case-sensitive by default and does not trim spaces.
What should I do if I get this SPLK-1003 question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
Are there clue words in this question I should notice?
Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
This SPLK-1003 practice question is part of Courseiva's free Splunk certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SPLK-1003 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.