SPLK-1001 Using Fields and Lookups Practice Question
Exhibit
index=main | rex field=_raw "(?<ip>\d+\.\d+\.\d+\.\d+)" | lookup country_lookup ip OUTPUT country
Refer to the exhibit. The search returns no results for the 'country' field even though the lookup file exists and contains IP-to-country mappings. Which is the most likely issue?
⚠ Common exam trap
Splunk often tests the subtlety that a lookup can silently return zero results when the field format (e.g., IP as string vs integer, or with/without leading zeros) does not exactly match the lookup key, leading candidates to mistakenly blame file location or command order.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The IP field extracted by rex is in a different format than the lookup key.
The most likely issue is that the IP field extracted by the `rex` command is in a different format than the lookup key (e.g., the lookup expects an integer representation of the IP, or a different subnet notation, or the extracted field contains extra characters like whitespace or quotes). Lookups match based on exact string equality, so any mismatch in format (e.g., '192.168.1.1' vs '192.168.001.001' or '3232235521') will cause zero results, even if the lookup file is correctly configured and contains the mapping.
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 command should be placed before the rex command.
Why it's wrong here
Order does not matter as long as ip field exists before lookup.
- ✗
The country field already exists in the events.
Why it's wrong here
If country already existed, it would be overwritten; still would show.
- ✗
The lookup file is in the wrong directory.
Why it's wrong here
If the file were missing, the search would error, but it returns results without country.
- ✓
The IP field extracted by rex is in a different format than the lookup key.
Why this is correct
Format mismatch prevents matches.
Visual reference
Go deeper
Related to this question
About these practice questions
This SPLK-1001 question is part of Courseiva's 502-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This SPLK-1001 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-1001 exam.