Question 79 of 510
Using Fields and LookupsmediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is an IP lookup format mismatch between the extracted field and the lookup key. This occurs because Splunk lookups rely on exact string equality, so if the `rex` command extracts an IP with leading zeros, extra whitespace, or in a different notation—such as an integer representation like 3232235521 instead of dotted-decimal 192.168.1.1—the lookup will return zero results even when the CSV file contains the correct mapping. On the SPLK-1002 exam, this question tests your understanding of how lookups process field values and the importance of data normalization before performing a lookup; a common trap is assuming the lookup file is missing or misconfigured when the real issue is a subtle formatting discrepancy. To avoid this, always inspect the extracted field’s exact contents using `| table` or `| rex` debug mode, and ensure both sides use identical formatting. Remember the mnemonic: “Lookups love literal matches—format your fields to fit the file.”

SPLK-1002 Using Fields and Lookups Practice Question

This SPLK-1002 practice question tests your understanding of using fields and lookups. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. 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

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?

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.

Question 1mediummultiple choice
Full question →

Exhibit

index=main | rex field=_raw "(?<ip>\d+\.\d+\.\d+\.\d+)" | lookup country_lookup ip OUTPUT country

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.

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 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.

    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.

Common exam traps

Common exam trap: answer the scenario, not the keyword

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.

Trap categories for this question

  • Command / output trap

    If country already existed, it would be overwritten; still would show.

Detailed technical explanation

How to think about this question

Lookups in Splunk perform exact string matching on the lookup key field(s). If the `rex` command extracts an IP address as a string (e.g., '10.0.0.1') but the lookup CSV stores IPs as integers (e.g., 167772161) or with leading zeros (e.g., '010.000.000.001'), no match occurs. Additionally, the `rex` command may capture trailing whitespace or carriage returns if the regex is not anchored properly, causing invisible mismatches. A common real-world scenario is when IPs are stored in the lookup as CIDR ranges (e.g., '10.0.0.0/24') and the search attempts an exact match against a single IP, which will always fail.

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 network engineer segments a warehouse floor into three subnets: 20 scanners, 5 printers, and 2 management hosts. Picking the wrong mask wastes addresses or leaves too few usable hosts. Exam questions test whether you can apply CIDR notation, calculate block size, and identify the correct usable-host range for a given prefix.

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.

Related practice questions

Related SPLK-1002 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free SPLK-1002 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this SPLK-1002 question test?

Using Fields and Lookups — This question tests Using Fields and Lookups — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: 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.

What should I do if I get this SPLK-1002 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 →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 30, 2026

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.

Loading comments…

Sign in to join the discussion.

This SPLK-1002 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-1002 exam.