Splunk® Enterprise

Data Model and Pivot Tutorial

Download manual as PDF

This documentation does not apply to the most recent version of Splunk. Click here for the latest version.
Download topic as PDF

Add lookup files into Splunk

The data models and pivots that you will create in this tutorial require some fields from an external lookup file. This topic walks through adding the required lookup to Splunk and creating a new lookup definition.

For more information about creating lookup definitions (as well as uploading CSV files), see "Use field lookups to add information to your events".

Download the lookup file

Download and uncompress the following file:

This file maps the productId, which exists field in the Buttercup Games tutorial data, to a product name and price.

Find the Lookups manager

1. In the Splunk bar, on the upper right, click Settings.

2. Under Knowledge, click Lookups.

6.1 tutorial settings lookups.png

This opens the Lookups editor where you can create new lookups or edit existing ones.

6.1 tutorial lookupsmanager.png

You can view and edit existing lookups by clicking on the links in the table for Lookup table files, Lookup definitions, and Automatic lookups.

Upload the lookup table file

1. In the Lookups manager under "Actions" for Lookup table files, click Add new.

This takes you to the Add new' lookup table files view where you upload CSV files to use in your definitions for field lookups.

6.1 tutorial addnewlookuptable.png

2. To save your lookup table file in the Search app, leave the Destination app as search.

3. Under Upload a lookup file, browse for the CSV file (prices.csv) to upload.

4. Under Destination filename, name the file prices.csv.

This is the name you use to refer to the file in a lookup definition.

5. Click Save.

This uploads your lookup file to the Search app and returns to the lookup table files list.

6.1 tutorial lookuptablefiles.png

Note: If Splunk does not recognize or cannot upload the file, check that it was uncompressed before you attempt to upload it again.

Share the lookup table file globally

If the lookup file is not shared, you can not select it when you define the lookup.

1. Go to the Lookup table files list.

2. Under Sharing for the prices.csv lookup table's Path, click Permissions.

This opens the Permission dialog box for the prices.csv lookup file.

3. Under Object should appear in, select All apps.

6.1 tutorial lookuptablepermissions.png

4. Click Save.

6.1 tutorial lookuptableglobal.png

Add the field lookup definition

1. Return to the Lookups manager.

2. Under Actions for Lookup definitions, click Add New.

This takes you to the Add new lookups definitions view where you define your field lookup.

6.1 tutorial newlookupdefinition.png

3. Leave the Destination app as search.

4. Name your lookup prices_lookup.

5. Under Type, select File-based.

File-based lookups add fields from a static table, usually a CSV file.

6. Under Lookup file, select prices.csv (the name of your lookup table).

7. Leave Configure time-based lookup and Advanced options unselected.

8. Click Save.

This defines prices_lookup as a file-based lookup.

6.1 tutorial lookupdefinitionsaved.png

Share the lookup definition with all apps

1. Return to the Lookup definitions list.

2. Under Sharing for prices_lookup, click Permissions.

The Permission dialog box for the prices.lookup opens.

3. Under Object should appear in, select All apps.

6.1 tutorial lookupdefinitionspermissions.png

4. Click Save.

6.1 tutorial lookupdefinitionsshared.png

Next steps

Continue to the next section to learn about data models and create them.

Get the tutorial data into Splunk Enterprise
About data models and data model objects

This documentation applies to the following versions of Splunk® Enterprise: 6.1, 6.1.1, 6.1.2, 6.1.3, 6.1.4, 6.1.5, 6.1.6, 6.1.7, 6.1.8, 6.1.9, 6.1.10, 6.1.11, 6.1.12, 6.1.13

Was this documentation topic helpful?

Enter your email address, and someone from the documentation team will respond to you:

Please provide your comments here. Ask a question or make a suggestion.

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

Please try to keep this discussion focused on the content covered in this documentation topic. If you have a more general question about Splunk functionality or are experiencing a difficulty with Splunk, consider posting a question to Splunkbase Answers.

0 out of 1000 Characters