<?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: Is there a function that randomly shuffles results? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Is-there-a-function-that-randomly-shuffles-results/m-p/386629#M6476</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;how about something like this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=yourIndex
| eval randomValue=random()
| sort randomValue
| table _time _raw randomValue
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 01 Apr 2019 19:13:05 GMT</pubDate>
    <dc:creator>martinpu</dc:creator>
    <dc:date>2019-04-01T19:13:05Z</dc:date>
    <item>
      <title>Is there a function that randomly shuffles results?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Is-there-a-function-that-randomly-shuffles-results/m-p/386628#M6475</link>
      <description>&lt;P&gt;Similar to &lt;CODE&gt;sort&lt;/CODE&gt;, except I'm looking for a function to randomly shuffle the results. This achieves the same result as the Linux &lt;CODE&gt;shuf&lt;/CODE&gt; command.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 18:43:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Is-there-a-function-that-randomly-shuffles-results/m-p/386628#M6475</guid>
      <dc:creator>davidch12</dc:creator>
      <dc:date>2019-04-01T18:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a function that randomly shuffles results?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Is-there-a-function-that-randomly-shuffles-results/m-p/386629#M6476</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;how about something like this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=yourIndex
| eval randomValue=random()
| sort randomValue
| table _time _raw randomValue
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Apr 2019 19:13:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Is-there-a-function-that-randomly-shuffles-results/m-p/386629#M6476</guid>
      <dc:creator>martinpu</dc:creator>
      <dc:date>2019-04-01T19:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a function that randomly shuffles results?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Is-there-a-function-that-randomly-shuffles-results/m-p/386630#M6477</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ... | eval _random=random()
 | sort 0 _random
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ... | eval _random=md5(_raw)
 | sort 0 _random
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Apr 2019 19:49:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Is-there-a-function-that-randomly-shuffles-results/m-p/386630#M6477</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-04-01T19:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a function that randomly shuffles results?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Is-there-a-function-that-randomly-shuffles-results/m-p/386631#M6478</link>
      <description>&lt;P&gt;Looks like the "0" argument to sort ensures all results are returned, even if the number is greater than 10,000:&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.5/SearchReference/Sort"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.5/SearchReference/Sort&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Is my interpretation correct?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 21:27:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Is-there-a-function-that-randomly-shuffles-results/m-p/386631#M6478</guid>
      <dc:creator>davidch12</dc:creator>
      <dc:date>2019-04-01T21:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a function that randomly shuffles results?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Is-there-a-function-that-randomly-shuffles-results/m-p/386632#M6479</link>
      <description>&lt;P&gt;Yes, this is very important; never run &lt;CODE&gt;sort&lt;/CODE&gt; without a number.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2019 21:53:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Is-there-a-function-that-randomly-shuffles-results/m-p/386632#M6479</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-04-01T21:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a function that randomly shuffles results?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Is-there-a-function-that-randomly-shuffles-results/m-p/694054#M11618</link>
      <description>&lt;P data-unlink="true"&gt;I have to look up this command every few months because I can never remember it... Are you talking about the 'scrub' command? Turns your search results from&lt;BR /&gt;&lt;BR /&gt;email= thisemail@gmail.com&amp;nbsp; &amp;gt; email= fjnwspfvj@gmail.com or possibly to &amp;gt;&lt;BR /&gt;email= dspehbpwn@smrls.dpo&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;It keeps the data in the same format just jumbles everything up?&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/9.2.2403/SearchReference/Scrub" target="_blank"&gt;https://docs.splunk.com/Documentation/SplunkCloud/9.2.2403/SearchReference/Scrub&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Scrub" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Scrub&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jul 2024 12:45:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Is-there-a-function-that-randomly-shuffles-results/m-p/694054#M11618</guid>
      <dc:creator>kelstahl8705</dc:creator>
      <dc:date>2024-07-23T12:45:08Z</dc:date>
    </item>
  </channel>
</rss>

