<?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 add fields from one index to another with the same sourcetype? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-add-fields-from-one-index-to-another-with-the-same/m-p/156903#M31799</link>
    <description>&lt;P&gt;Hi MuS,&lt;/P&gt;

&lt;P&gt;thanks for your answer.&lt;/P&gt;

&lt;P&gt;This command is allmost the one i need. &lt;/P&gt;

&lt;P&gt;With the second command, b, c, g... is counted too, but i just want those fields to display in the stats.&lt;/P&gt;

&lt;P&gt;Have you got any other idea?&lt;/P&gt;

&lt;P&gt;Thanks so far.&lt;/P&gt;</description>
    <pubDate>Thu, 09 Oct 2014 12:16:58 GMT</pubDate>
    <dc:creator>Fritsch</dc:creator>
    <dc:date>2014-10-09T12:16:58Z</dc:date>
    <item>
      <title>How to add fields from one index to another with the same sourcetype?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-add-fields-from-one-index-to-another-with-the-same/m-p/156901#M31797</link>
      <description>&lt;P&gt;I want to add fields from one Index to another, with the same sourcetype "stash"&lt;/P&gt;

&lt;P&gt;In Index A there are fields like a, b, c, d,.. &lt;/P&gt;

&lt;P&gt;Thats what i did:&lt;/P&gt;

&lt;P&gt;index="A" | stats count by a | sort -count | collct index="B"&lt;/P&gt;

&lt;P&gt;The fields I get in index B are "a" and "count", but&lt;/P&gt;

&lt;P&gt;how can I get the fields b, c, and d in the Index B? &lt;/P&gt;</description>
      <pubDate>Thu, 09 Oct 2014 08:59:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-add-fields-from-one-index-to-another-with-the-same/m-p/156901#M31797</guid>
      <dc:creator>Fritsch</dc:creator>
      <dc:date>2014-10-09T08:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to add fields from one index to another with the same sourcetype?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-add-fields-from-one-index-to-another-with-the-same/m-p/156902#M31798</link>
      <description>&lt;P&gt;Hi Fritsch,&lt;/P&gt;

&lt;P&gt;either re-run the command for each field like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="A" | stats count by a | sort -count | collect index="B"
index="A" | stats count by b | sort -count | collect index="B"
index="A" | stats count by c | sort -count | collect index="B"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="A" | stats count by a, b, c, d | sort -count | collect index="B"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or without a &lt;CODE&gt;count&lt;/CODE&gt; field:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="A" | table a, b, c, d | collect index="B"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Thu, 09 Oct 2014 10:32:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-add-fields-from-one-index-to-another-with-the-same/m-p/156902#M31798</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-10-09T10:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to add fields from one index to another with the same sourcetype?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-add-fields-from-one-index-to-another-with-the-same/m-p/156903#M31799</link>
      <description>&lt;P&gt;Hi MuS,&lt;/P&gt;

&lt;P&gt;thanks for your answer.&lt;/P&gt;

&lt;P&gt;This command is allmost the one i need. &lt;/P&gt;

&lt;P&gt;With the second command, b, c, g... is counted too, but i just want those fields to display in the stats.&lt;/P&gt;

&lt;P&gt;Have you got any other idea?&lt;/P&gt;

&lt;P&gt;Thanks so far.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Oct 2014 12:16:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-add-fields-from-one-index-to-another-with-the-same/m-p/156903#M31799</guid>
      <dc:creator>Fritsch</dc:creator>
      <dc:date>2014-10-09T12:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to add fields from one index to another with the same sourcetype?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-add-fields-from-one-index-to-another-with-the-same/m-p/156904#M31800</link>
      <description>&lt;P&gt;Have you tried the command using the &lt;CODE&gt;table&lt;/CODE&gt; as well? This should do what you want...&lt;/P&gt;</description>
      <pubDate>Thu, 09 Oct 2014 12:34:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-add-fields-from-one-index-to-another-with-the-same/m-p/156904#M31800</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-10-09T12:34:35Z</dc:date>
    </item>
  </channel>
</rss>

