<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to replace a numeric value with string? in Splunk Cloud Platform</title>
    <link>https://community.splunk.com/t5/Splunk-Cloud-Platform/How-to-replace-a-numeric-value-with-string/m-p/615073#M1805</link>
    <description>&lt;P&gt;That worked!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":man_dancing:"&gt;🕺&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Sep 2022 23:08:13 GMT</pubDate>
    <dc:creator>Sheril</dc:creator>
    <dc:date>2022-09-28T23:08:13Z</dc:date>
    <item>
      <title>How to replace a numeric value with string?</title>
      <link>https://community.splunk.com/t5/Splunk-Cloud-Platform/How-to-replace-a-numeric-value-with-string/m-p/614401#M1793</link>
      <description>&lt;P&gt;I am pushing DNS logs to Splunk Cloud and I am noticing the QueryType is in numeric format, I would like to see that in string format&lt;BR /&gt;&lt;BR /&gt;Sample Log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"ColoID":378,"Datetime":"2022-09-23T23:55:23Z","DeviceID":"df34037e","DstIP":"xx.xx.xx.xx","DstPort":0,"Email":"non_identity@ec.com","Location":"London","Policy":"","PolicyID":"","Protocol":"https","QueryCategoryIDs":[26,81],"QueryName":"europe-west9-a-osconfig.googleapis.com","QueryNameReversed":"com.googleapis.europe-west9-a-osconfig","QuerySize":67,"QueryType":28,"RData":[{"type":"28","data":"F2V1cm9wZS13ZXN0OS1hLW9zY29uZmlnCmdvb2dsZWFwaXMDY29tAAAcAAEAAADdABAqABRQQAkIIAAAAAAAACAK"},{"type":"28","data":"F2V1cm9wZS13ZXN0OS1hLW9zY29uZmlnCmdvb2dsZWFwaXMDY29tAAAcAAEAAADdABAqABRQQAkIHwAAAAAAACAK"},{"type":"28","data":"F2V1cm9wZS13ZXN0OS1hLW9zY29uZmlnCmdvb2dsZWFwaXMDY29tAAAcAAEAAADdABAqABRQQAkIFQAAAAAAACAK"},{"type":"28","data":"F2V1cm9wZS13ZXN0OS1hLW9zY29uZmlnCmdvb2dsZWFwaXMDY29tAAAcAAEAAADdABAqABRQQAkIIQAAAAAAACAK"}],"ResolverDecision":"allowedOnNoPolicyMatch","SrcIP":"xx.xx.xx.xx","SrcPort":0,"UserID":"723f7"}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the above log you would notice&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;QueryType&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;:28, I'd like to replace 28 with a string -&amp;nbsp;&lt;SPAN&gt;AAAA, other DNS query types can be found in&amp;nbsp;&lt;A href="https://en.wikipedia.org/wiki/List_of_DNS_record_types" target="_blank" rel="noopener"&gt;https://en.wikipedia.org/wiki/List_of_DNS_record_types&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;Is there a way I could replace or append the query types string instead of the numeric value that is showing up in the logs by using techniques like lookup or Join?&lt;BR /&gt;&lt;BR /&gt;Desired Log: (only QueryType is changed from 28 to AAAA)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"ColoID":378,"Datetime":"2022-09-23T23:55:23Z","DeviceID":"df34037e","DstIP":"xx.xx.xx.xx","DstPort":0,"Email":"non_identity@ec.com","Location":"London","Policy":"","PolicyID":"","Protocol":"https","QueryCategoryIDs":[26,81],"QueryName":"europe-west9-a-osconfig.googleapis.com","QueryNameReversed":"com.googleapis.europe-west9-a-osconfig","QuerySize":67,"QueryType":AAAA,"RData":[{"type":"28","data":"F2V1cm9wZS13ZXN0OS1hLW9zY29uZmlnCmdvb2dsZWFwaXMDY29tAAAcAAEAAADdABAqABRQQAkIIAAAAAAAACAK"},{"type":"28","data":"F2V1cm9wZS13ZXN0OS1hLW9zY29uZmlnCmdvb2dsZWFwaXMDY29tAAAcAAEAAADdABAqABRQQAkIHwAAAAAAACAK"},{"type":"28","data":"F2V1cm9wZS13ZXN0OS1hLW9zY29uZmlnCmdvb2dsZWFwaXMDY29tAAAcAAEAAADdABAqABRQQAkIFQAAAAAAACAK"},{"type":"28","data":"F2V1cm9wZS13ZXN0OS1hLW9zY29uZmlnCmdvb2dsZWFwaXMDY29tAAAcAAEAAADdABAqABRQQAkIIQAAAAAAACAK"}],"ResolverDecision":"allowedOnNoPolicyMatch","SrcIP":"xx.xx.xx.xx","SrcPort":0,"UserID":"723f7"}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 24 Sep 2022 00:12:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Cloud-Platform/How-to-replace-a-numeric-value-with-string/m-p/614401#M1793</guid>
      <dc:creator>Sheril</dc:creator>
      <dc:date>2022-09-24T00:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace a numeric value with string?</title>
      <link>https://community.splunk.com/t5/Splunk-Cloud-Platform/How-to-replace-a-numeric-value-with-string/m-p/614405#M1794</link>
      <description>&lt;P&gt;Create yourself a CSV lookup file (e.g. DNS_record_types.csv) containing the fields you want to lookup, let's assume you have&amp;nbsp;&lt;/P&gt;&lt;P&gt;QueryType,Type&lt;BR /&gt;28,AAAA&lt;/P&gt;&lt;P&gt;Then in your SPL do&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| lookup DNS_record_types.csv QueryType&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;and it will output the "Type" field from your lookup into your data.&lt;/P&gt;&lt;P&gt;Quick note: JOIN is almost NEVER a solution in Splunk and certainly never for lookups. Leave any SQL concepts behind when working with Splunk SPL&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 24 Sep 2022 03:16:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Cloud-Platform/How-to-replace-a-numeric-value-with-string/m-p/614405#M1794</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2022-09-24T03:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace a numeric value with string?</title>
      <link>https://community.splunk.com/t5/Splunk-Cloud-Platform/How-to-replace-a-numeric-value-with-string/m-p/615073#M1805</link>
      <description>&lt;P&gt;That worked!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":man_dancing:"&gt;🕺&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 23:08:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Cloud-Platform/How-to-replace-a-numeric-value-with-string/m-p/615073#M1805</guid>
      <dc:creator>Sheril</dc:creator>
      <dc:date>2022-09-28T23:08:13Z</dc:date>
    </item>
  </channel>
</rss>

