Splunk Search

How to typecast integer to string and save that to a new field?

DEAD_BEEF
Builder

I have a numeric field that needs to be string to put be CIM compliant. I tried using tostring, but it still shows up with the # in the interesting field list so it's still being read as a number. Also, how do I go about saving that field so it is always returned as a string to be used by the data model?

alt text

currently numeric field called

id
values      102342,23482,23498,23490

I want string field

id_string
values      102342,23482,23498,23490
0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...