<?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 unite different fields into one field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-unite-different-fields-into-one-field/m-p/448836#M127152</link>
    <description>&lt;P&gt;There are quite few methods depending on how much other fields you want to protect/align&lt;BR /&gt;
1. Using Rename &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* (sourcetpe=A Or sourcetype=B) | rename ProdID_1 as ProdID| rename ProdID_2 as ProdID
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;OL&gt;
&lt;LI&gt;using eval (if you need to keep the original fields too)&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;&lt;CODE&gt;index=* (sourcetpe=A Or sourcetype=B) | eval ProdID=ProdID_1 | eval ProdID=ProdID_2&lt;/CODE&gt;&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;Using transaction  (if you want to club events of same ProdID into single transaction)&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=* (sourcetpe=A Or sourcetype=B) | rename ProdID_1 as ProdID| rename ProdID_2 as ProdID&lt;BR /&gt;
| transaction ProdID&lt;/CODE&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;</description>
    <pubDate>Wed, 08 May 2019 07:34:22 GMT</pubDate>
    <dc:creator>koshyk</dc:creator>
    <dc:date>2019-05-08T07:34:22Z</dc:date>
    <item>
      <title>How to unite different fields into one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-unite-different-fields-into-one-field/m-p/448835#M127151</link>
      <description>&lt;P&gt;I'm about to unite product codes from 2 different sourcetypes with different names, but with the same value.&lt;/P&gt;

&lt;P&gt;Here's a sample table:&lt;BR /&gt;
ProdID_1 (from sourcetype A)&lt;BR /&gt;&lt;BR /&gt;
0001596                                         &lt;/P&gt;

&lt;P&gt;ProdID_2 (from sourcetype B)&lt;BR /&gt;
0001596&lt;/P&gt;

&lt;P&gt;My desired output should be unified like this:&lt;BR /&gt;
ProdID&lt;BR /&gt;
0001596&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 06:27:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-unite-different-fields-into-one-field/m-p/448835#M127151</guid>
      <dc:creator>marxsabandana</dc:creator>
      <dc:date>2019-05-08T06:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to unite different fields into one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-unite-different-fields-into-one-field/m-p/448836#M127152</link>
      <description>&lt;P&gt;There are quite few methods depending on how much other fields you want to protect/align&lt;BR /&gt;
1. Using Rename &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* (sourcetpe=A Or sourcetype=B) | rename ProdID_1 as ProdID| rename ProdID_2 as ProdID
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;OL&gt;
&lt;LI&gt;using eval (if you need to keep the original fields too)&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;&lt;CODE&gt;index=* (sourcetpe=A Or sourcetype=B) | eval ProdID=ProdID_1 | eval ProdID=ProdID_2&lt;/CODE&gt;&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;Using transaction  (if you want to club events of same ProdID into single transaction)&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;index=* (sourcetpe=A Or sourcetype=B) | rename ProdID_1 as ProdID| rename ProdID_2 as ProdID&lt;BR /&gt;
| transaction ProdID&lt;/CODE&gt;&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Wed, 08 May 2019 07:34:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-unite-different-fields-into-one-field/m-p/448836#M127152</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2019-05-08T07:34:22Z</dc:date>
    </item>
  </channel>
</rss>

