Getting Data In

CSV numbers imported as strings... and tonumber() returning null

CarmineCalo
Path Finder

I'm a Splunk newbie.

I'm trying to import a CSV, including both strings and numbers, with source="csv": while strings are correctly imported and indexed, numbers are saved as strings as well. This make me crazy makins some simple stats

I tryed to apply tonumber to convert the strings into number, but if the value is =! than zero, tonumber return a null value.

Any suggestion?

Tks!

0 Karma
1 Solution

p_gurav
Champion

Hi,

try using convert command with auto() function. Please refer following document:

https://docs.splunk.com/Documentation/SplunkCloud/6.6.3/SearchReference/Convert

View solution in original post

p_gurav
Champion

Hi,

try using convert command with auto() function. Please refer following document:

https://docs.splunk.com/Documentation/SplunkCloud/6.6.3/SearchReference/Convert

Get Updates on the Splunk Community!

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Deprecation of Splunk Observability Kubernetes “Classic Navigator” UI starting ...

Access to Splunk Observability Kubernetes “Classic Navigator” UI will no longer be available starting January ...

Now Available: Cisco Talos Threat Intelligence Integrations for Splunk Security Cloud ...

At .conf24, we shared that we were in the process of integrating Cisco Talos threat intelligence into Splunk ...