<?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 collect command working correctly ? in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/Is-collect-command-working-correctly/m-p/437127#M3891</link>
    <description>&lt;P&gt;thank you!!&lt;/P&gt;</description>
    <pubDate>Thu, 02 May 2019 13:18:42 GMT</pubDate>
    <dc:creator>dreadangel</dc:creator>
    <dc:date>2019-05-02T13:18:42Z</dc:date>
    <item>
      <title>Is collect command working correctly ?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Is-collect-command-working-correctly/m-p/437125#M3889</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=* sourcetype="..."  ... | eval new_field="new_value-".old_field, new_field_id="[some new id]".old_field_id | table *  | collect index=inx_copy_data
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Straightforward task - to select events, filter them, add some new fields, copy the results to another index. &lt;BR /&gt;
But in &lt;STRONG&gt;inx_copy_data&lt;/STRONG&gt; not all data is copied - I can't find the new fields (new_field, new_field_id) nor the old ones (old_field, old_field_id).&lt;BR /&gt;
Do I miss something?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:19:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Is-collect-command-working-correctly/m-p/437125#M3889</guid>
      <dc:creator>dreadangel</dc:creator>
      <dc:date>2020-09-30T00:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: Is collect command working correctly ?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Is-collect-command-working-correctly/m-p/437126#M3890</link>
      <description>&lt;P&gt;Hi @dreadangel&lt;/P&gt;

&lt;P&gt;Use &lt;CODE&gt;stats&lt;/CODE&gt; instead of &lt;CODE&gt;table *&lt;/CODE&gt; because using &lt;CODE&gt;table&lt;/CODE&gt;doesn't transform the results and &lt;CODE&gt;collect&lt;/CODE&gt; would still get the raw data.&lt;/P&gt;

&lt;P&gt;something like this should do the trick : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* sourcetype="..."  ... | eval new_field="new_value-".old_field, new_field_id="[some new id]".old_field_id | stats values(*) as * by _time  | collect index=inx_copy_data
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Reference here :&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/7.2.6/SearchReference/Collect"&gt;https://docs.splunk.com/Documentation/Splunk/7.2.6/SearchReference/Collect&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Note: &lt;BR /&gt;
Summary indexing counts against ur license so careful when using it.&lt;/P&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
David&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 12:45:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Is-collect-command-working-correctly/m-p/437126#M3890</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-05-02T12:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: Is collect command working correctly ?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Is-collect-command-working-correctly/m-p/437127#M3891</link>
      <description>&lt;P&gt;thank you!!&lt;/P&gt;</description>
      <pubDate>Thu, 02 May 2019 13:18:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Is-collect-command-working-correctly/m-p/437127#M3891</guid>
      <dc:creator>dreadangel</dc:creator>
      <dc:date>2019-05-02T13:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Is collect command working correctly ?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Is-collect-command-working-correctly/m-p/437128#M3892</link>
      <description>&lt;P&gt;so the big problem is due to &lt;STRONG&gt;_raw&lt;/STRONG&gt; field, correct? Is any way to avoid this? Or I should omit &lt;STRONG&gt;_raw&lt;/STRONG&gt; fields from collect command ?&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 08:54:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Is-collect-command-working-correctly/m-p/437128#M3892</guid>
      <dc:creator>dreadangel</dc:creator>
      <dc:date>2019-05-07T08:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: Is collect command working correctly ?</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/Is-collect-command-working-correctly/m-p/437129#M3893</link>
      <description>&lt;P&gt;yeah, sure you can omit it to avoid having the same info multiple times. It's actually best to replace that * with the exact fields you need&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 10:30:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/Is-collect-command-working-correctly/m-p/437129#M3893</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-05-07T10:30:19Z</dc:date>
    </item>
  </channel>
</rss>

