<?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: Splunk DB Connect: How to combine data from 3 different sourcetypes into single event with join, transaction or stats? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-DB-Connect-How-to-combine-data-from-3-different/m-p/131792#M97793</link>
    <description>&lt;P&gt;Look into the "&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Join"&gt;join&lt;/A&gt;" command. Note that subsearches have a default limit of 10k results though.&lt;/P&gt;

&lt;P&gt;Also - have you considered doing the combination while you are running the SQL instead of in Splunk? If you are familiar with SQL why not do all the necessary joins before storing the data in Splunk? Is the data coming from different databases?&lt;/P&gt;</description>
    <pubDate>Thu, 05 Feb 2015 21:05:10 GMT</pubDate>
    <dc:creator>aholzer</dc:creator>
    <dc:date>2015-02-05T21:05:10Z</dc:date>
    <item>
      <title>Splunk DB Connect: How to combine data from 3 different sourcetypes into single event with join, transaction or stats?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-DB-Connect-How-to-combine-data-from-3-different/m-p/131791#M97792</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;
I have been giving my best shot an attempting to use stat or transaction without success.  I don’t even know if they are the best way to accomplish what I am looking for.&lt;/P&gt;

&lt;P&gt;I have 3 queries which are populating 3 sourcetypes and this is working great:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Query to make sourcetype 1&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| dbquery "app_stage" "SELECT FILING_ID, JOB_ID FROM custom.app_1_FILING"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;(this table does not contain a timestamp but should be the first one written by the app)&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Query to make sourcetype 2&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| dbquery " app_stage " "SELECT FILING_EVENT_ID, FILING_ID, to_char(FILING_DATE,'YYYY-MM-DD HH24:MI:SS') FILING_DATE, A_NUMBER, RESPONSE_SUBJECT, RESPONSE_SUBJECT FROM custom. 1_FILING_EVENT" limit=1000
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Query to make sourcetype 3&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| dbquery "jms_stage" "SELECT JOB_ID, PROJECT_ID, PROJECT_ID, JOB_NUMBER, to_char(CREATE_DATE,'YYYY-MM-DD HH24:MI:SS') CREATE_DATE, CREATE_BY_NAME FROM custom. app_JOB" limit=1000
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;CODE&gt;JOB_ID&lt;/CODE&gt; in sourcetype 1 is equal to &lt;CODE&gt;JOB_ID&lt;/CODE&gt; in sourcetype 3&lt;BR /&gt;
&lt;CODE&gt;FILING_ID&lt;/CODE&gt; in sourcetype 1 is equal to &lt;CODE&gt;FILING_ID&lt;/CODE&gt; in sourcetype 2&lt;/P&gt;

&lt;P&gt;I want to eventually present various dashboards to display the status of this applications workflow.  The big use case will be when a &lt;CODE&gt;JOB_ID&lt;/CODE&gt; generates a &lt;CODE&gt;FILING_ID&lt;/CODE&gt; but does not yield an &lt;CODE&gt;A_NUMBER&lt;/CODE&gt; and &lt;CODE&gt;RESPONSE_SUBJECT&lt;/CODE&gt; (from sourcetype 2).&lt;/P&gt;

&lt;P&gt;I have tried various searches using join, transaction, and stat but the most I have been able to achieve is ending up with a table showing the &lt;CODE&gt;JOB_ID&lt;/CODE&gt; and &lt;CODE&gt;FILING_ID&lt;/CODE&gt; aligned as a single event but missing all of the other field data.&lt;/P&gt;

&lt;P&gt;This is an example of one of these using stats for testing (I would optimize the search later by being as specific as possible.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* host=* sourcetype=stage*  JOB_ID=*
| stats values(FILING_DATE) AS FilingDate, values(A_NUMBER) AS ANum, values(RESPONSE_SUBJECT) AS ResponseSubject, values(PROJECT_ID) AS ProjectID, values(JOB_NUMBER) AS JobNum by FILING_ID, JOB_ID
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Anybody able to help steer me in the right direction?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Feb 2015 20:56:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-DB-Connect-How-to-combine-data-from-3-different/m-p/131791#M97792</guid>
      <dc:creator>LiquidTension</dc:creator>
      <dc:date>2015-02-05T20:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk DB Connect: How to combine data from 3 different sourcetypes into single event with join, transaction or stats?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-DB-Connect-How-to-combine-data-from-3-different/m-p/131792#M97793</link>
      <description>&lt;P&gt;Look into the "&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Join"&gt;join&lt;/A&gt;" command. Note that subsearches have a default limit of 10k results though.&lt;/P&gt;

&lt;P&gt;Also - have you considered doing the combination while you are running the SQL instead of in Splunk? If you are familiar with SQL why not do all the necessary joins before storing the data in Splunk? Is the data coming from different databases?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Feb 2015 21:05:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-DB-Connect-How-to-combine-data-from-3-different/m-p/131792#M97793</guid>
      <dc:creator>aholzer</dc:creator>
      <dc:date>2015-02-05T21:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk DB Connect: How to combine data from 3 different sourcetypes into single event with join, transaction or stats?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-DB-Connect-How-to-combine-data-from-3-different/m-p/131793#M97794</link>
      <description>&lt;P&gt;So I took your advice and developed a single query that joins everything together from the 3 separate tables and it works great.&lt;/P&gt;

&lt;P&gt;I do have a question specific to DB connect now.  When I set the rising column do I have to worry that some columns may not populate for a time while the "rising column" may have incremented hundreds of times?&lt;/P&gt;

&lt;P&gt;For context, 2 of the columns (the important ones) are only filled when an email response comes and the process is a success.  The rising columns are incremented every time a user starts this process.  &lt;/P&gt;

&lt;P&gt;This table will have over a million rows and if splunk does a differential based on the rising column only that would not help for our use case.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Feb 2015 18:18:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-DB-Connect-How-to-combine-data-from-3-different/m-p/131793#M97794</guid>
      <dc:creator>LiquidTension</dc:creator>
      <dc:date>2015-02-11T18:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk DB Connect: How to combine data from 3 different sourcetypes into single event with join, transaction or stats?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Splunk-DB-Connect-How-to-combine-data-from-3-different/m-p/131794#M97795</link>
      <description>&lt;P&gt;Yes, I think that it is going to do that differential based on the rising column.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Mar 2015 21:29:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Splunk-DB-Connect-How-to-combine-data-from-3-different/m-p/131794#M97795</guid>
      <dc:creator>jcoates_splunk</dc:creator>
      <dc:date>2015-03-28T21:29:07Z</dc:date>
    </item>
  </channel>
</rss>

