Search Reference

 


inputlookup

inputlookup

Synopsis

Loads search results from a specified static lookup table.

Syntax

inputlookup [required=<bool>] [append=<bool>] [start=<int>] [max=<int>] (<filename> | <tablename>)

Required arguments

<filename>
Syntax: <string>
Description: The name of the lookup file (must end with .csv or .csv.gz).
<tablename>
Syntax: <string>
Description: The name of the lookup table as specified by a stanza name in transforms.conf.

Optional arguments

append
Syntax: append=<bool>
Description: If set to true, the data from the lookup file is appended to the current set of results rather than replacing it. Defaults to false.
max
Syntax max=<int>
Description: Specify the maximum number of events to be read from the file. Defaults to 1000000000.
required
Syntax: Specify whether the lookup table must exist for the search to proceed. If set to false, the search proceeds and Splunk generates a warning message. Defaults to true.
start
Syntax: start=<int>
Description: Specify the 0-based offset of the first event to read. If start=0, it begins with the first event. If start=4, it begins with the fifth event. Defaults to 0.


Description

Reads in lookup table as specified by a filename (must end with .csv or .csv.gz) or a table name (as specified by a stanza name in transforms.conf). If 'append' is set to true (false by default), the data from the lookup file is appended to the current set of results rathering than replacing it.

Examples

Example 1: Read in "usertogroup" lookup table (as specified in transforms.conf).

| inputlookup usertogroup

Example 2: Same as example2 except that the data from the lookup table is appended to any current results.

| inputlookup append=t usertogroup

Example 3: Read in "users.csv" lookup file (under $SPLUNK_HOME/etc/system/lookups or $SPLUNK_HOME/etc/apps/*/lookups).

| inputlookup users.csv

See also

inputcsv, join, lookup, outputlookup

Answers

Have questions? Visit Splunk Answers and see what questions and answers the Splunk community has using the inputlookup command.

This documentation applies to the following versions of Splunk: 4.1 , 4.1.1 , 4.1.2 , 4.1.3 , 4.1.4 , 4.1.5 , 4.1.6 , 4.1.7 , 4.1.8 , 4.2 , 4.2.1 , 4.2.2 , 4.2.3 , 4.2.4 , 4.2.5 , 4.3 , 4.3.1 , 4.3.2 View the Article History for its revisions.


You must be logged into splunk.com in order to post comments. Log in now.

Was this documentation topic helpful?

If you'd like to hear back from us, please provide your email address:

We'd love to hear what you think about this topic or the documentation as a whole. Feedback you enter here will be delivered to the documentation team.

Feedback submitted, thanks!