<?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: Why does timewrap require timechart results? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-does-timewrap-require-timechart-results/m-p/745775#M241538</link>
    <description>&lt;P&gt;timewrap is looking for a hidden field called _span&lt;/P&gt;&lt;P&gt;This should work&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count where index=my_index by _time span=1h
| eval _span=3600
| timewrap 1w&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;This should give a warning&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=my_index
| timechart span=1h count 
| fields - _span
| timewrap 1w&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 08 May 2025 11:48:00 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2025-05-08T11:48:00Z</dc:date>
    <item>
      <title>Why does timewrap require timechart results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-timewrap-require-timechart-results/m-p/745774#M241537</link>
      <description>&lt;P&gt;If you use timewrap without previously using the timechart command, you get a warning "The timewrap command is designed to work on the output of timechart. ".&lt;/P&gt;&lt;P&gt;If the format is correct, it works though.&lt;/P&gt;&lt;P&gt;For example, these two queries give the same output:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count where index=my_index by _time span=1h
| timewrap 1w&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;index=my_index
| timechart span=1h count 
| timewrap 1w&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;The first query is way faster in this case, but I get the warning mentioned above. (this is not about the tstats command, it is also possible to recreate timechart it with other commands iirc)&lt;/P&gt;&lt;P&gt;The docs say: "You &lt;STRONG&gt;must&lt;/STRONG&gt; use the timechart command in the search before you use the timewrap command. " (both SPL and SPL2 docs say this)&lt;BR /&gt;&lt;BR /&gt;Why is this the case though? Beside the docs and the warning, nothing hints towards this being correct, it works...&lt;/P&gt;&lt;P&gt;Am I missing something? If not, is it possible to deactivate the warning?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 11:27:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-timewrap-require-timechart-results/m-p/745774#M241537</guid>
      <dc:creator>tiimo</dc:creator>
      <dc:date>2025-05-08T11:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: Why does timewrap require timechart results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-timewrap-require-timechart-results/m-p/745775#M241538</link>
      <description>&lt;P&gt;timewrap is looking for a hidden field called _span&lt;/P&gt;&lt;P&gt;This should work&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| tstats count where index=my_index by _time span=1h
| eval _span=3600
| timewrap 1w&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;This should give a warning&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=my_index
| timechart span=1h count 
| fields - _span
| timewrap 1w&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 08 May 2025 11:48:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-timewrap-require-timechart-results/m-p/745775#M241538</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2025-05-08T11:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: Why does timewrap require timechart results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-timewrap-require-timechart-results/m-p/745776#M241539</link>
      <description>&lt;P&gt;Huh, thanks, that works. This should be changed or at least clarified in the documentation&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 11:54:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-timewrap-require-timechart-results/m-p/745776#M241539</guid>
      <dc:creator>tiimo</dc:creator>
      <dc:date>2025-05-08T11:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: Why does timewrap require timechart results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-timewrap-require-timechart-results/m-p/745777#M241540</link>
      <description>&lt;P&gt;If all these things were documented, there wouldn't be a need for Answers, Splunk Trust and .conf!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":rolling_on_the_floor_laughing:"&gt;🤣&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 May 2025 12:06:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-timewrap-require-timechart-results/m-p/745777#M241540</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2025-05-08T12:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: Why does timewrap require timechart results?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-does-timewrap-require-timechart-results/m-p/746349#M241621</link>
      <description>&lt;P&gt;You could also use tstats with prestats=t paramter like&lt;/P&gt;&lt;PRE&gt;| tstats prestats=t count where index=my_index by _time span=1h
| timechart span=1h count
| timewrap 1w&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.4.2/SearchReference/Tstats" target="_blank" rel="noopener"&gt;https://docs.splunk.com/Documentation/Splunk/9.4.2/SearchReference/Tstats&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 May 2025 16:51:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-does-timewrap-require-timechart-results/m-p/746349#M241621</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2025-05-16T16:51:19Z</dc:date>
    </item>
  </channel>
</rss>

