Splunksplunklookupenrichmentdata-augmentationproduction-ready
Lookup Table Enrichment
SPL patterns for enriching log data with external CSV lookups, KV store queries, and dynamic data augmentation.
title: "Lookup Table Enrichment" description: "SPL patterns for enriching log data with external CSV lookups, KV store queries, and dynamic data augmentation." category: "Splunk" language: "spl" tags: ["splunk", "lookup", "enrichment", "data-augmentation", "production-ready"] createdAt: "2025-04-18" updatedAt: "2025-05-01"
Overview
Lookup enrichment patterns that augment raw log data with business context from CSV files and KV stores. Includes building dynamic baselines via outputlookup and using them for deviation detection.
Code
| lookup customer_segments.csv customer_id OUTPUT segment, tier
| lookup oncall_schedule.csv team OUTPUT primary_oncall
| eval priority=case(tier="platinum", "P1", tier="gold", "P2")Notes
coalesce()provides default values when lookup matches are missingoutputlookupcreates/updates CSV files from search results for use in future searches- KV store lookups support real-time updates without reindexing
- Multi-field lookups match on composite keys for precise enrichment
- Schedule baseline-building searches to run daily and store results for comparison queries