<?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: spath command in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/spath-command/m-p/518356#M3297</link>
    <description>&lt;P&gt;Depending on what your data actually looks like, extracting a single value might be just as easily achieved with rex&lt;/P&gt;</description>
    <pubDate>Tue, 08 Sep 2020 06:14:36 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2020-09-08T06:14:36Z</dc:date>
    <item>
      <title>spath command</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/spath-command/m-p/518343#M3291</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;What is spath command, when to use it? Please expalin below command.&lt;/P&gt;&lt;DIV&gt;| spath input=json&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Is there any alternative command for spath?&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;When we use spath command will it consume more time ?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Tue, 08 Sep 2020 05:35:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/spath-command/m-p/518343#M3291</guid>
      <dc:creator>VijaySrrie</dc:creator>
      <dc:date>2020-09-08T05:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: spath command</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/spath-command/m-p/518345#M3292</link>
      <description>&lt;P&gt;Most common use for spath is with json. It helps to get elements and tables inside json.&amp;nbsp;&lt;BR /&gt;Same kind of command is xmlkv which is used to manipulate xml events.&amp;nbsp;&lt;BR /&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2020 05:46:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/spath-command/m-p/518345#M3292</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-09-08T05:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: spath command</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/spath-command/m-p/518348#M3294</link>
      <description>&lt;P&gt;I am creating a dashboard,&amp;nbsp;&lt;/P&gt;&lt;P&gt;spath is not the best practice to use in dashboard itseems, can you modify the below query with some other command?&lt;/P&gt;&lt;P&gt;index=indexname application=appname&amp;nbsp; sourcetype=sourcetypename&amp;nbsp; asset_env=prod&amp;nbsp; component=abc "message=Received event:"&lt;BR /&gt;| table json&lt;BR /&gt;| spath input=json output=body path=Records{}.body&lt;/P&gt;&lt;P&gt;|spath input=body output=requestId path=request.requestId&lt;/P&gt;&lt;P&gt;|stats dc(requestId)&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2020 05:53:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/spath-command/m-p/518348#M3294</guid>
      <dc:creator>VijaySrrie</dc:creator>
      <dc:date>2020-09-08T05:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: spath command</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/spath-command/m-p/518351#M3295</link>
      <description>Can you post your event as sample data, without it, it’s hard to help you.&lt;BR /&gt;And also short verbal description what you want to achieve.</description>
      <pubDate>Tue, 08 Sep 2020 06:00:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/spath-command/m-p/518351#M3295</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2020-09-08T06:00:01Z</dc:date>
    </item>
    <item>
      <title>Re: spath command</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/spath-command/m-p/518356#M3297</link>
      <description>&lt;P&gt;Depending on what your data actually looks like, extracting a single value might be just as easily achieved with rex&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2020 06:14:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/spath-command/m-p/518356#M3297</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-08T06:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: spath command</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/spath-command/m-p/525474#M3866</link>
      <description>&lt;P&gt;Instead of spath command, we were asked to create Field extractions as a best practice.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 01:04:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/spath-command/m-p/525474#M3866</guid>
      <dc:creator>VijaySrrie</dc:creator>
      <dc:date>2020-10-20T01:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: spath command</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/spath-command/m-p/525477#M3867</link>
      <description>&lt;P&gt;Sure&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/164779"&gt;@VijaySrrie&lt;/a&gt;&amp;nbsp;then, let us know the sample logs, which fields you want to extract, etc... please.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to answer your first question about spath basics:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The&amp;nbsp;&lt;/SPAN&gt;spath&lt;SPAN&gt;&amp;nbsp;command enables you to extract information from the structured data formats XML and JSON.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mw-headline"&gt;Alternatives to the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;spath&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;command&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;If you are using autokv or index-time field extractions, the path extractions are performed for you at index time.&lt;/P&gt;&lt;P&gt;You do not need to explicitly use the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;spath&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;command to provide a path.&lt;/P&gt;&lt;P&gt;If using indexed_extractions=JSON or using KV_MODE=JSON in the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;props.conf&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;file, then the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;spath&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;command is not necessary to explicitly use.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mw-headline"&gt;Specify the output field and a path for an XML attribute&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Use the @ symbol to specify an XML attribute. Consider the following XML list of books and authors.&lt;/P&gt;&lt;PRE&gt;&amp;lt;?xml version="1.0"&amp;gt;
&amp;lt;purchases&amp;gt;
   &amp;lt;book&amp;gt;
         &amp;lt;author&amp;gt;Martin, George R.R.&amp;lt;/author&amp;gt;
         &amp;lt;title yearPublished=1996&amp;gt;A Game of Thrones&amp;lt;/title&amp;gt;
         &amp;lt;title yearPublished=1998&amp;gt;A Clash of Kings&amp;lt;/title&amp;gt;
  &amp;lt;/book&amp;gt;
   &amp;lt;book&amp;gt;
         &amp;lt;author&amp;gt;Clarke, Susanna&amp;lt;/author&amp;gt;
         &amp;lt;title yearPublished=2004&amp;gt;Jonathan Strange and Mr. Norrell&amp;lt;/title&amp;gt;
   &amp;lt;/book&amp;gt;
   &amp;lt;book&amp;gt;
         &amp;lt;author&amp;gt;Kay, Guy Gavriel&amp;lt;/author&amp;gt;
         &amp;lt;title yearPublished=1990&amp;gt;Tigana&amp;lt;/title&amp;gt;
   &amp;lt;/book&amp;gt;
   &amp;lt;book&amp;gt;
         &amp;lt;author&amp;gt;Bujold, Lois McMasters&amp;lt;/author&amp;gt;
         &amp;lt;title yearPublished=1986&amp;gt;The Warrior's Apprentice&amp;lt;/title&amp;gt;
   &amp;lt;/book&amp;gt;
&amp;lt;/purchases&amp;gt;&lt;/PRE&gt;&lt;P&gt;Use this search to return the path for the book and the year it was published.&lt;/P&gt;&lt;P class="inlineQuery"&gt;... | spath output=dates path=purchases.book.title{@yearPublished} | table dates&lt;/P&gt;&lt;P class="inlineQuery"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="inlineQuery"&gt;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/latest/SearchReference/Spath" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/SplunkCloud/latest/SearchReference/Spath&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2020 01:36:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/spath-command/m-p/525477#M3867</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2020-10-20T01:36:24Z</dc:date>
    </item>
  </channel>
</rss>

