Splunk Search

csv lookup number vs string

dglass0215
Path Finder

I have a csv lookup that has a column with numerical data (specifically integers).  When I do the lookup, splunk is treating it as string data.  For example if I use this column to sort the numbers 1,2,3,10,11 it sorts as 1,10,11,2,3.

Any help is appreciated.

Labels (1)
0 Karma

isoutamo
SplunkTrust
SplunkTrust
You can do e.g.
eval num = tonumber(field_as_string)
There are also some other ways to do it, which you could found by goole.
r. Ismo
0 Karma
Get Updates on the Splunk Community!

Detector Best Practices: Static Thresholds

Introduction In observability monitoring, static thresholds are used to monitor fixed, known values within ...

Expert Tips from Splunk Education, Observability in Action, Plus More New Articles on ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Changes to Splunk Instructor-Led Training Completion Criteria

We’re excited to share an update to our instructor-led training program that enhances the learning experience ...