<?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 list datamodel name in a Table in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-list-datamodel-name-in-a-Table/m-p/382930#M111869</link>
    <description>&lt;P&gt;You can try adding the following against each entry:&lt;/P&gt;

&lt;P&gt;| appendcols [| datamodel &amp;lt;&amp;gt;|spath displayName | table displayName]&lt;/P&gt;

&lt;P&gt;for example:&lt;/P&gt;

&lt;P&gt;| tstats summariesonly=t min(_time) as min, max(_time) as max count from datamodel=Web | appendcols [| datamodel Web |spath displayName | table displayName]&lt;BR /&gt;
 | append &lt;BR /&gt;
     [| tstats summariesonly=t min(_time) as min, max(_time) as max count from datamodel=Malware| appendcols [| datamodel Malware |spath displayName | table displayName]] &lt;BR /&gt;
| append ...&lt;BR /&gt;
|eval ...&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 21:19:35 GMT</pubDate>
    <dc:creator>pramit46</dc:creator>
    <dc:date>2020-09-29T21:19:35Z</dc:date>
    <item>
      <title>How to list datamodel name in a Table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-list-datamodel-name-in-a-Table/m-p/382928#M111867</link>
      <description>&lt;P&gt;I am trying to list certain datamodels in a table along with their log count but I can't seem to find how to list the datamodel name itself in the table.  I tried &lt;CODE&gt;displayName&lt;/CODE&gt; and &lt;CODE&gt;datamodelName&lt;/CODE&gt;.  The query lists everything I want except for the datamodel so it's difficult to tell which data belongs to which datamodel.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5801i305CF0A062C7A1A5/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats summariesonly=t min(_time) as min, max(_time) as max count from datamodel=Web 
| append 
    [| tstats summariesonly=t min(_time) as min, max(_time) as max count from datamodel=Malware] 
| append 
    [| tstats summariesonly=t min(_time) as min, max(_time) as max count from datamodel=Intrusion_Detection ] 
| eval "Start time"=strftime(min, "%c") 
| eval "End time"=strftime(max, "%c") 
| eval "Event count" = count 
| fields "Start time" "End time" "Event count"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;FINAL SOLUTION&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats summariesonly=t min(_time) as min, max(_time) as max count from datamodel=Web 
| appendcols 
    [| datamodel Web 
    | spath displayName 
    | table displayName] 
| eval datamodel_name = Web 
| append 
    [| tstats summariesonly=t min(_time) as min, max(_time) as max count from datamodel=Malware 
    | appendcols 
        [| datamodel Malware 
        | spath displayName 
        | table displayName] 
    | eval datamodel_name = Malware] 
| append 
    [| tstats summariesonly=t min(_time) as min, max(_time) as max count from datamodel=Intrusion_Detection 
    | appendcols 
        [| datamodel Intrusion_Detection 
        | spath displayName 
        | table displayName] 
    | eval datamodel_name = Intrusion_Detection] 
| eval "Start time"=strftime(min, "%c") 
| eval "End time"=strftime(max, "%c") 
| eval "Event count" = count 
| fields "Start time" "End time" "Event count" displayName
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 15 Sep 2018 19:24:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-list-datamodel-name-in-a-Table/m-p/382928#M111867</guid>
      <dc:creator>DEAD_BEEF</dc:creator>
      <dc:date>2018-09-15T19:24:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to list datamodel name in a Table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-list-datamodel-name-in-a-Table/m-p/382929#M111868</link>
      <description>&lt;P&gt;Can you try below one &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; tstats summariesonly=t min(_time) as min, max(_time) as max count from datamodel=Web |eval datamodel=Web 
 | append 
     [| tstats summariesonly=t min(_time) as min, max(_time) as max count from datamodel=Malwareeval|eval datamodel=Malwareeval] 
 | append 
     [| tstats summariesonly=t min(_time) as min, max(_time) as max count from datamodel=Intrusion_Detection| eval datamodel= Intrusion_Detection] 
 | eval "Start time"=strftime(min, "%c") 
 | eval "End time"=strftime(max, "%c") 
 | eval "Event count" = count 
 | fields "Start time" "End time" "Event count" datamodel
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Sep 2018 04:45:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-list-datamodel-name-in-a-Table/m-p/382929#M111868</guid>
      <dc:creator>Ravan</dc:creator>
      <dc:date>2018-09-18T04:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to list datamodel name in a Table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-list-datamodel-name-in-a-Table/m-p/382930#M111869</link>
      <description>&lt;P&gt;You can try adding the following against each entry:&lt;/P&gt;

&lt;P&gt;| appendcols [| datamodel &amp;lt;&amp;gt;|spath displayName | table displayName]&lt;/P&gt;

&lt;P&gt;for example:&lt;/P&gt;

&lt;P&gt;| tstats summariesonly=t min(_time) as min, max(_time) as max count from datamodel=Web | appendcols [| datamodel Web |spath displayName | table displayName]&lt;BR /&gt;
 | append &lt;BR /&gt;
     [| tstats summariesonly=t min(_time) as min, max(_time) as max count from datamodel=Malware| appendcols [| datamodel Malware |spath displayName | table displayName]] &lt;BR /&gt;
| append ...&lt;BR /&gt;
|eval ...&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:19:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-list-datamodel-name-in-a-Table/m-p/382930#M111869</guid>
      <dc:creator>pramit46</dc:creator>
      <dc:date>2020-09-29T21:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to list datamodel name in a Table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-list-datamodel-name-in-a-Table/m-p/382931#M111870</link>
      <description>&lt;P&gt;@Ravan I tried your solution, but it returned the same thing I have now, no datamodel name listed in the table.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 15:46:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-list-datamodel-name-in-a-Table/m-p/382931#M111870</guid>
      <dc:creator>DEAD_BEEF</dc:creator>
      <dc:date>2018-09-27T15:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to list datamodel name in a Table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-list-datamodel-name-in-a-Table/m-p/382932#M111871</link>
      <description>&lt;P&gt;This worked!  I will add the working query to the initial question.  Thank you @pramit46&lt;/P&gt;</description>
      <pubDate>Thu, 27 Sep 2018 15:49:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-list-datamodel-name-in-a-Table/m-p/382932#M111871</guid>
      <dc:creator>DEAD_BEEF</dc:creator>
      <dc:date>2018-09-27T15:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to list datamodel name in a Table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-list-datamodel-name-in-a-Table/m-p/382933#M111872</link>
      <description>&lt;P&gt;Good to know that!!!.. Happy Splunking &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Oct 2018 09:57:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-list-datamodel-name-in-a-Table/m-p/382933#M111872</guid>
      <dc:creator>pramit46</dc:creator>
      <dc:date>2018-10-01T09:57:52Z</dc:date>
    </item>
  </channel>
</rss>

