<?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 help on tsats command with datamodel in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/help-on-tsats-command-with-datamodel/m-p/666662#M228691</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have created a basic datamodel called "TEST"&lt;/P&gt;&lt;P&gt;I try to query on this datamodel with tstats but the only piece of code which return value is :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count from datamodel=TEST&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;But i cant se the events related to this request&lt;/P&gt;&lt;P&gt;And if i try to be more explicit in my request like below, I have no results&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count from datamodel=TEST where EventCode=100&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;So what is the problem?&lt;/P&gt;&lt;P&gt;Other question : what is the interest to use datamodel and pivot command since it's possible to query on a datamodel without SPL?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Mon, 30 Oct 2023 07:04:40 GMT</pubDate>
    <dc:creator>jip31</dc:creator>
    <dc:date>2023-10-30T07:04:40Z</dc:date>
    <item>
      <title>help on tsats command with datamodel</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-tsats-command-with-datamodel/m-p/666662#M228691</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have created a basic datamodel called "TEST"&lt;/P&gt;&lt;P&gt;I try to query on this datamodel with tstats but the only piece of code which return value is :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count from datamodel=TEST&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;But i cant se the events related to this request&lt;/P&gt;&lt;P&gt;And if i try to be more explicit in my request like below, I have no results&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count from datamodel=TEST where EventCode=100&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;So what is the problem?&lt;/P&gt;&lt;P&gt;Other question : what is the interest to use datamodel and pivot command since it's possible to query on a datamodel without SPL?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 07:04:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-tsats-command-with-datamodel/m-p/666662#M228691</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2023-10-30T07:04:40Z</dc:date>
    </item>
    <item>
      <title>Re: help on tsats command with datamodel</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-tsats-command-with-datamodel/m-p/666667#M228693</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/102660"&gt;@jip31&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;as you can read at&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.1.1/Knowledge/Aboutdatamodels" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/9.1.1/Knowledge/Aboutdatamodels&lt;/A&gt;&amp;nbsp;, data models are tables containing the fields extracted from your events, but yu don't have the events, so youcannot see then in search results.&lt;/P&gt;&lt;P&gt;Data models are very useful because they are very fast in searching for fields.&lt;/P&gt;&lt;P&gt;they have a very fixed syntax in the order of options (as oter Splunk commands) so you have to put exactly the option in the required order.&lt;/P&gt;&lt;P&gt;Then when you use data model fields, you have to remember to use the datamodel name, so, in in your TEST datamodel you have the EventCode field, you have to use:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count from datamodel=TEST where TEST.EventCode=100&lt;/LI-CODE&gt;&lt;P&gt;Datamodel are very important when you have structured data to have very fast searches on large amount of data.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 07:19:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-tsats-command-with-datamodel/m-p/666667#M228693</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-10-30T07:19:04Z</dc:date>
    </item>
    <item>
      <title>Re: help on tsats command with datamodel</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-tsats-command-with-datamodel/m-p/666689#M228696</link>
      <description>&lt;P&gt;Hi Gcusello&lt;/P&gt;&lt;P&gt;I can see the fields extracted in my datamodel&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jip31_0-1698654397189.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/27874i3731DA4BBD2471C9/image-size/large?v=v2&amp;amp;px=999" role="button" title="jip31_0-1698654397189.png" alt="jip31_0-1698654397189.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And even if i use your search below I have no results&lt;/P&gt;&lt;PRE&gt;| tstats count from datamodel=TEST where TEST.EventCode=100&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have only results heriteld fields like host, sourcetype, source&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jip31_1-1698654573699.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/27875i4385761817ABAF98/image-size/large?v=v2&amp;amp;px=999" role="button" title="jip31_1-1698654573699.png" alt="jip31_1-1698654573699.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 08:29:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-tsats-command-with-datamodel/m-p/666689#M228696</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2023-10-30T08:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: help on tsats command with datamodel</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-tsats-command-with-datamodel/m-p/666692#M228697</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/102660"&gt;@jip31&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;are you sure that data are in your datamodel?&lt;/P&gt;&lt;P&gt;test this using pivot.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 08:35:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-tsats-command-with-datamodel/m-p/666692#M228697</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-10-30T08:35:07Z</dc:date>
    </item>
    <item>
      <title>Re: help on tsats command with datamodel</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-on-tsats-command-with-datamodel/m-p/666704#M228698</link>
      <description>&lt;P&gt;it seems to be&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jip31_0-1698656244917.png" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/27880i86671D56006368A3/image-size/large?v=v2&amp;amp;px=999" role="button" title="jip31_0-1698656244917.png" alt="jip31_0-1698656244917.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also the message Datamodel 'TEST' had an invalid search, cannot get indexes to search&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2023 13:04:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-on-tsats-command-with-datamodel/m-p/666704#M228698</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2023-10-30T13:04:02Z</dc:date>
    </item>
  </channel>
</rss>

