<?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: Extract fields from json attributes in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-json-attributes/m-p/631726#M219412</link>
    <description>&lt;P&gt;I've looked into `spath`, but I think there's something else on top of that.&lt;/P&gt;&lt;P&gt;It works for the event itself wich is a json event, but onf the the properties inside this json event is also a json structure.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sergimola_0-1676988428602.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/23975iE956C94128EC59C1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sergimola_0-1676988428602.png" alt="sergimola_0-1676988428602.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using this works fine:&lt;/P&gt;&lt;PRE&gt;| spath output=data path=attributes.data&lt;/PRE&gt;&lt;P&gt;But if I want to create a field out of the `Number` property in `attributes.data` that doesn't work&lt;/P&gt;&lt;PRE&gt;| spath output=data_number path=attributes.data.Number&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Feb 2023 14:11:46 GMT</pubDate>
    <dc:creator>sergimola</dc:creator>
    <dc:date>2023-02-21T14:11:46Z</dc:date>
    <item>
      <title>How to extract fields from json attributes?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-json-attributes/m-p/631712#M219406</link>
      <description>&lt;P&gt;I am sending some traces from my service to Splunk using the OpenTelemetry Collector and the Splunk HEC exporter.&lt;/P&gt;
&lt;P&gt;My traces are getting to Splunk and their fields in general properly identified, but I would like for the attributes of an event that have a json format to be further decomposed into fields.&lt;/P&gt;
&lt;P&gt;This is an example of an event:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sergimola_0-1676983025324.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/23972iE9691AE8916A1C9B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sergimola_0-1676983025324.png" alt="sergimola_0-1676983025324.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I would like for the `attributes.data` field to be further decomposed.&lt;/P&gt;
&lt;P&gt;Is that possible?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 18:27:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-json-attributes/m-p/631712#M219406</guid>
      <dc:creator>sergimola</dc:creator>
      <dc:date>2023-02-21T18:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields from json attributes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-json-attributes/m-p/631720#M219410</link>
      <description>&lt;P&gt;You can use spath in your search SPL to extract fields from JSON data.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 13:27:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-json-attributes/m-p/631720#M219410</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-02-21T13:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields from json attributes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-json-attributes/m-p/631721#M219411</link>
      <description>&lt;P&gt;Use the &lt;FONT face="courier new,courier"&gt;spath&lt;/FONT&gt; command in your search query to extract fields from JSON events.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 13:27:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-json-attributes/m-p/631721#M219411</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-02-21T13:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields from json attributes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-json-attributes/m-p/631726#M219412</link>
      <description>&lt;P&gt;I've looked into `spath`, but I think there's something else on top of that.&lt;/P&gt;&lt;P&gt;It works for the event itself wich is a json event, but onf the the properties inside this json event is also a json structure.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sergimola_0-1676988428602.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/23975iE956C94128EC59C1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sergimola_0-1676988428602.png" alt="sergimola_0-1676988428602.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using this works fine:&lt;/P&gt;&lt;PRE&gt;| spath output=data path=attributes.data&lt;/PRE&gt;&lt;P&gt;But if I want to create a field out of the `Number` property in `attributes.data` that doesn't work&lt;/P&gt;&lt;PRE&gt;| spath output=data_number path=attributes.data.Number&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 14:11:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-json-attributes/m-p/631726#M219412</guid>
      <dc:creator>sergimola</dc:creator>
      <dc:date>2023-02-21T14:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields from json attributes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-json-attributes/m-p/631734#M219422</link>
      <description>&lt;LI-CODE lang="markup"&gt;| spath output=data path=attributes.data
| spath input=data&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 21 Feb 2023 15:33:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-json-attributes/m-p/631734#M219422</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-02-21T15:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: Extract fields from json attributes</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-json-attributes/m-p/631759#M219435</link>
      <description>&lt;P&gt;Oh, nice, this works!&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 20:43:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-fields-from-json-attributes/m-p/631759#M219435</guid>
      <dc:creator>sergimola</dc:creator>
      <dc:date>2023-02-21T20:43:26Z</dc:date>
    </item>
  </channel>
</rss>

