<?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 Joining two eventtypes based on an ID in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Joining-two-eventtypes-based-on-an-ID/m-p/209769#M61339</link>
    <description>&lt;P&gt;I currently have two sets of data where one includes all of the product views, and one includes all of the downloads on the webapp. Both reports generate a userId and I have them extracted as fields. &lt;/P&gt;

&lt;P&gt;Ideally I would like to join another search where it looks up the items that were downloaded based on the userId. An example of the nature the data is in:&lt;BR /&gt;
_&lt;BR /&gt;
    Company Name // UserId // Product Name // View Count&lt;BR /&gt;
    Company ABCD // 11111 // Product A // 2&lt;BR /&gt;
    Company EFGH // 22222 // Product A // 7&lt;BR /&gt;
    Company IJKLM // 33333 // Product B // 5&lt;BR /&gt;
_&lt;BR /&gt;
    User Id // Document Id // Download Count&lt;BR /&gt;
    11111 // 88194432978 // 1&lt;BR /&gt;
    11111 // 36634432211 // 2&lt;BR /&gt;
    22222 // 12983769718 // 1&lt;BR /&gt;
    33333 // 51928379855 // 3&lt;BR /&gt;
_&lt;BR /&gt;
Below is the search I use to get the product access based on a client:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventtype="advisorViewedProduct" | top productName by companyName, userId | stats list(*) as * by companyName, userId | table companyName,userId,productName,count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The following is the search I use to get the document downloads:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventtype"documentDownloads" | top documentId by userId | stats list(*) as * by userId | table userId, documentId, count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 02 Aug 2016 22:13:50 GMT</pubDate>
    <dc:creator>emamedov</dc:creator>
    <dc:date>2016-08-02T22:13:50Z</dc:date>
    <item>
      <title>Joining two eventtypes based on an ID</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-two-eventtypes-based-on-an-ID/m-p/209769#M61339</link>
      <description>&lt;P&gt;I currently have two sets of data where one includes all of the product views, and one includes all of the downloads on the webapp. Both reports generate a userId and I have them extracted as fields. &lt;/P&gt;

&lt;P&gt;Ideally I would like to join another search where it looks up the items that were downloaded based on the userId. An example of the nature the data is in:&lt;BR /&gt;
_&lt;BR /&gt;
    Company Name // UserId // Product Name // View Count&lt;BR /&gt;
    Company ABCD // 11111 // Product A // 2&lt;BR /&gt;
    Company EFGH // 22222 // Product A // 7&lt;BR /&gt;
    Company IJKLM // 33333 // Product B // 5&lt;BR /&gt;
_&lt;BR /&gt;
    User Id // Document Id // Download Count&lt;BR /&gt;
    11111 // 88194432978 // 1&lt;BR /&gt;
    11111 // 36634432211 // 2&lt;BR /&gt;
    22222 // 12983769718 // 1&lt;BR /&gt;
    33333 // 51928379855 // 3&lt;BR /&gt;
_&lt;BR /&gt;
Below is the search I use to get the product access based on a client:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventtype="advisorViewedProduct" | top productName by companyName, userId | stats list(*) as * by companyName, userId | table companyName,userId,productName,count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The following is the search I use to get the document downloads:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventtype"documentDownloads" | top documentId by userId | stats list(*) as * by userId | table userId, documentId, count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Aug 2016 22:13:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-two-eventtypes-based-on-an-ID/m-p/209769#M61339</guid>
      <dc:creator>emamedov</dc:creator>
      <dc:date>2016-08-02T22:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: Joining two eventtypes based on an ID</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-two-eventtypes-based-on-an-ID/m-p/209770#M61340</link>
      <description>&lt;P&gt;Where are the download terms? Is that in a separate log? &lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2016 22:33:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-two-eventtypes-based-on-an-ID/m-p/209770#M61340</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-02T22:33:31Z</dc:date>
    </item>
    <item>
      <title>Re: Joining two eventtypes based on an ID</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-two-eventtypes-based-on-an-ID/m-p/209771#M61341</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventtype="advisorViewedProduct" | top productName by companyName, userId  | rename count as "View count"| append [search eventtype"documentDownloads" | top documentId by userId  | rename count as "Download count" ]| stats values(*) as * by userId
| table companyName, userId productName "View count" documentId "Download count" | stats list(*) as * by companyName userId
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Alternatively &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventtype="advisorViewedProduct" | top productName by companyName, userId  | rename count as "View count"| append [search eventtype"documentDownloads" | top documentId by userId  | rename count as "Download count" ] | eventstats values(companyName) as companyName by userId | stats list(*) as * by companyName userId  | table companyName, userId productName "View count" documentId "Download count"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 02 Aug 2016 22:34:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-two-eventtypes-based-on-an-ID/m-p/209771#M61341</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-08-02T22:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: Joining two eventtypes based on an ID</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-two-eventtypes-based-on-an-ID/m-p/209772#M61342</link>
      <description>&lt;P&gt;It's all in the same log, just a different eventtype. &lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2016 23:34:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-two-eventtypes-based-on-an-ID/m-p/209772#M61342</guid>
      <dc:creator>emamedov</dc:creator>
      <dc:date>2016-08-02T23:34:42Z</dc:date>
    </item>
  </channel>
</rss>

