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!

The All New Performance Insights for Splunk

Splunk gives you amazing tools to analyze system data and make business-critical decisions, react to issues, ...

Good Sourcetype Naming

When it comes to getting data in, one of the earliest decisions made is what to use as a sourcetype. Often, ...

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...