<?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 Transactions in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Joining-Transactions/m-p/12368#M995</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have two searches that use transactions to get part of a table of results that I want.&lt;/P&gt;

&lt;P&gt;Firstly, &lt;/P&gt;

&lt;PRE&gt;
index="ems" sourcetype="queueconfig" OR sourcetype="topicconfig" | multikv noheader=true | rename Column_1 as config | search NOT "*sample*" | transaction instance | fields instance, application, config | fields - _time
&lt;/PRE&gt;

&lt;P&gt;This brings me a table, eg&lt;/P&gt;

&lt;PRE&gt;
App1     Result1
         Result2 exampletext
         Result3

App2     Result4 A text
         Result5 b
         Result6 c
&lt;/PRE&gt;

&lt;P&gt;And a second, which produces similar for a different sourcetype&lt;/P&gt;

&lt;PRE&gt;
index="ems" sourcetype="factoryconfig" | search NOT "" | strcat factoryName " - " url " - " type factoryconfig | fields instance, application, factoryconfig | transaction instance
&lt;/PRE&gt;

&lt;PRE&gt;
App1    Connection1 details
        Connection2 details
        Connection3 details

App2    Connection4 details
        Connection5 details
        Connection6 details
&lt;/PRE&gt;

&lt;P&gt;What i want to do, is join the two searches&lt;/P&gt;

&lt;PRE&gt;
 index="ems" sourcetype="queueconfig" OR sourcetype="topicconfig" | multikv noheader=true | rename Column_1 as config | search NOT "sample" | transaction instance | fields instance, application, config | fields - _time | join max=0 instance [search index="ems" sourcetype="factoryconfig" | strcat factoryName " - " url " - " type factoryconfig | fields instance, application, factoryconfig | transaction instance]
&lt;/PRE&gt;

&lt;P&gt;To get a table such as&lt;/P&gt;

&lt;PRE&gt;
App1     Result1               Connection1 - url - type
         Result2 exampletext   Connection2 - url - type
         Result3               Connection3 - url - type

App2     Result4 A text        Connection4 - url - type
         Result5 b             Connection5 - url - type
         Result6 c             Connection6 - url - type
&lt;/PRE&gt;

&lt;P&gt;But, when I do a join, it messes up the formatting and i get this, ie it gets rid of my nice formatting.  Does anyone know why?&lt;/P&gt;

&lt;PRE&gt;
App1     Result1 Result2 example text Result3   Connection1 - url - type Connection2  - url - type Connection3 - url - type

App2     Result4 A text Result5 b Result6 c       Connection4 - url - type  Connection5  - url - type Connection6 - url - type

&lt;/PRE&gt;</description>
    <pubDate>Wed, 28 Apr 2010 00:01:26 GMT</pubDate>
    <dc:creator>Hazel</dc:creator>
    <dc:date>2010-04-28T00:01:26Z</dc:date>
    <item>
      <title>Joining Transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-Transactions/m-p/12368#M995</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have two searches that use transactions to get part of a table of results that I want.&lt;/P&gt;

&lt;P&gt;Firstly, &lt;/P&gt;

&lt;PRE&gt;
index="ems" sourcetype="queueconfig" OR sourcetype="topicconfig" | multikv noheader=true | rename Column_1 as config | search NOT "*sample*" | transaction instance | fields instance, application, config | fields - _time
&lt;/PRE&gt;

&lt;P&gt;This brings me a table, eg&lt;/P&gt;

&lt;PRE&gt;
App1     Result1
         Result2 exampletext
         Result3

App2     Result4 A text
         Result5 b
         Result6 c
&lt;/PRE&gt;

&lt;P&gt;And a second, which produces similar for a different sourcetype&lt;/P&gt;

&lt;PRE&gt;
index="ems" sourcetype="factoryconfig" | search NOT "" | strcat factoryName " - " url " - " type factoryconfig | fields instance, application, factoryconfig | transaction instance
&lt;/PRE&gt;

&lt;PRE&gt;
App1    Connection1 details
        Connection2 details
        Connection3 details

App2    Connection4 details
        Connection5 details
        Connection6 details
&lt;/PRE&gt;

&lt;P&gt;What i want to do, is join the two searches&lt;/P&gt;

&lt;PRE&gt;
 index="ems" sourcetype="queueconfig" OR sourcetype="topicconfig" | multikv noheader=true | rename Column_1 as config | search NOT "sample" | transaction instance | fields instance, application, config | fields - _time | join max=0 instance [search index="ems" sourcetype="factoryconfig" | strcat factoryName " - " url " - " type factoryconfig | fields instance, application, factoryconfig | transaction instance]
&lt;/PRE&gt;

&lt;P&gt;To get a table such as&lt;/P&gt;

&lt;PRE&gt;
App1     Result1               Connection1 - url - type
         Result2 exampletext   Connection2 - url - type
         Result3               Connection3 - url - type

App2     Result4 A text        Connection4 - url - type
         Result5 b             Connection5 - url - type
         Result6 c             Connection6 - url - type
&lt;/PRE&gt;

&lt;P&gt;But, when I do a join, it messes up the formatting and i get this, ie it gets rid of my nice formatting.  Does anyone know why?&lt;/P&gt;

&lt;PRE&gt;
App1     Result1 Result2 example text Result3   Connection1 - url - type Connection2  - url - type Connection3 - url - type

App2     Result4 A text Result5 b Result6 c       Connection4 - url - type  Connection5  - url - type Connection6 - url - type

&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Apr 2010 00:01:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-Transactions/m-p/12368#M995</guid>
      <dc:creator>Hazel</dc:creator>
      <dc:date>2010-04-28T00:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-Transactions/m-p/12369#M996</link>
      <description>&lt;P&gt;Hazel, is this still an open issues for you?  I don't fully get what you are asking, but I'm wondering if your &lt;A href="http://answers.splunk.com/questions/1912/using-multiple-stats-list" rel="nofollow"&gt;Using Multiple stats list&lt;/A&gt; question was part of the answer to this question as well.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jun 2010 20:26:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-Transactions/m-p/12369#M996</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-06-02T20:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-Transactions/m-p/12370#M997</link>
      <description>&lt;P&gt;Hi, yes I was still hoping for an answer for this one - might raise a support case.  In this one, I get the data fine, but the question is to do with the formatting.  As you can see in my two separate searches, it is formatted nicely on multiple lines, but when I join the searches, you lose this feature.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2010 14:59:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-Transactions/m-p/12370#M997</guid>
      <dc:creator>Hazel</dc:creator>
      <dc:date>2010-06-03T14:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-Transactions/m-p/12371#M998</link>
      <description>&lt;P&gt;Can you add to your post the search that you are using to do the join.  I see the two base searches, but there could be an issue with how you are using the &lt;CODE&gt;join&lt;/CODE&gt; search command that would help reveal the issue.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2010 20:20:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-Transactions/m-p/12371#M998</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-06-03T20:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-Transactions/m-p/12372#M999</link>
      <description>&lt;P&gt;index="ems" sourcetype="queueconfig" OR sourcetype="topicconfig" | multikv noheader=true | rename Column_1 as config | search NOT "sample" | transaction instance | fields instance, application, config | fields - _time | join max=0 instance [search index="ems" sourcetype="factoryconfig" | strcat factoryName " - " url " - " type factoryconfig | fields instance, application, factoryconfig | transaction instance]&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2010 21:23:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-Transactions/m-p/12372#M999</guid>
      <dc:creator>Hazel</dc:creator>
      <dc:date>2010-06-03T21:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: Joining Transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Joining-Transactions/m-p/12373#M1000</link>
      <description>&lt;P&gt;Hi Hazel, 
it seems like you lost the "multivalue" property for those fields. Have you tried to force a:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | makemv delim="&amp;lt;proper delimiter&amp;gt;" factoryconfig | makemv delim="&amp;lt;proper delimiter&amp;gt;" config
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;at the end of the search string? You might have to cook a delimiter into the original fields to be able to split them at the end of the search string.&lt;/P&gt;

&lt;P&gt;I was able to obtain a messed up table as in your example with this query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="test" earliest=-10d 
| rex field=source "(?&amp;lt;path&amp;gt;(\w+\\\\)+)" 
| bucket _time span=10m 
| transaction path 
| fields host, path, source 
| fields - _time 
| join s max=0 
    [search index="test" earliest=-10d 
    | rex field=source "(?&amp;lt;path&amp;gt;(\w+\\\\)+)" 
    | rex field=source "(?&amp;lt;filename&amp;gt;[^\\\\]+)$" 
    | bucket _time span=10m 
    | transaction path 
    | fields host, path, source, filename 
    | fields - _time] 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And was able to restore the multivalues by appending this at the end:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | table host source path filename
| makemv delim=" " source 
| makemv delim=" " filename
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope that helped you out a bit&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2010 19:41:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Joining-Transactions/m-p/12373#M1000</guid>
      <dc:creator>Paolo_Prigione</dc:creator>
      <dc:date>2010-07-20T19:41:52Z</dc:date>
    </item>
  </channel>
</rss>

