<?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 Combine 2 or more strings based on a comman field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Combine-2-or-more-strings-based-on-a-comman-field/m-p/628778#M218412</link>
    <description>&lt;P&gt;Hi I am tracking service requests and responses and trying to create a table that contains both requests and response but requests and responses are in different lines ingested in splunk.&lt;/P&gt;&lt;P&gt;I have a common field (trace) which is available in both the strings and unique for a set of request and response pairs,&lt;/P&gt;&lt;P&gt;&amp;nbsp;example&lt;/P&gt;&lt;P&gt;line1: trace: 12345 , Request Received: {1}, URL:http://&lt;/P&gt;&lt;P&gt;line2: trace: 12346 , Request Received: {2}, URL:http://&lt;/P&gt;&lt;P&gt;line3: trace:12345 , Reponse provided: {3}&lt;/P&gt;&lt;P&gt;line4: trace:12346 , Reponse provided :{4}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In line1 and line 3 trace is common field and so is in line 1 and line 4&lt;/P&gt;&lt;P&gt;I want end result like in a table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;trace&amp;nbsp; &amp;nbsp; &amp;nbsp; request&amp;nbsp; &amp;nbsp; &amp;nbsp;response&lt;/P&gt;&lt;P&gt;12345&amp;nbsp; &amp;nbsp;{1}&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {3}&lt;/P&gt;&lt;P&gt;12346&amp;nbsp; {2}&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {4}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Jan 2023 01:20:25 GMT</pubDate>
    <dc:creator>batham</dc:creator>
    <dc:date>2023-01-30T01:20:25Z</dc:date>
    <item>
      <title>Combine 2 or more strings based on a comman field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Combine-2-or-more-strings-based-on-a-comman-field/m-p/628778#M218412</link>
      <description>&lt;P&gt;Hi I am tracking service requests and responses and trying to create a table that contains both requests and response but requests and responses are in different lines ingested in splunk.&lt;/P&gt;&lt;P&gt;I have a common field (trace) which is available in both the strings and unique for a set of request and response pairs,&lt;/P&gt;&lt;P&gt;&amp;nbsp;example&lt;/P&gt;&lt;P&gt;line1: trace: 12345 , Request Received: {1}, URL:http://&lt;/P&gt;&lt;P&gt;line2: trace: 12346 , Request Received: {2}, URL:http://&lt;/P&gt;&lt;P&gt;line3: trace:12345 , Reponse provided: {3}&lt;/P&gt;&lt;P&gt;line4: trace:12346 , Reponse provided :{4}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In line1 and line 3 trace is common field and so is in line 1 and line 4&lt;/P&gt;&lt;P&gt;I want end result like in a table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;trace&amp;nbsp; &amp;nbsp; &amp;nbsp; request&amp;nbsp; &amp;nbsp; &amp;nbsp;response&lt;/P&gt;&lt;P&gt;12345&amp;nbsp; &amp;nbsp;{1}&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {3}&lt;/P&gt;&lt;P&gt;12346&amp;nbsp; {2}&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {4}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 01:20:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Combine-2-or-more-strings-based-on-a-comman-field/m-p/628778#M218412</guid>
      <dc:creator>batham</dc:creator>
      <dc:date>2023-01-30T01:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: Combine 2 or more strings based on a comman field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Combine-2-or-more-strings-based-on-a-comman-field/m-p/628788#M218420</link>
      <description>&lt;P&gt;If those lines are the only text in raw data, you can do&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| extract pairdelim="," kvdelim=":"
| fields - _raw
| stats values(Request_Received) as request values(Response_provided) as response by trace&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result is&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;trace&lt;/TD&gt;&lt;TD&gt;response&lt;/TD&gt;&lt;TD&gt;request&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12345&lt;/TD&gt;&lt;TD&gt;{3}&lt;/TD&gt;&lt;TD&gt;{1}&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12346&lt;/TD&gt;&lt;TD&gt;{4}&lt;/TD&gt;&lt;TD&gt;{2}&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 07:08:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Combine-2-or-more-strings-based-on-a-comman-field/m-p/628788#M218420</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-01-30T07:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: Combine 2 or more strings based on a comman field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Combine-2-or-more-strings-based-on-a-comman-field/m-p/628899#M218455</link>
      <description>&lt;P&gt;Inner join actually worked for this.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 20:00:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Combine-2-or-more-strings-based-on-a-comman-field/m-p/628899#M218455</guid>
      <dc:creator>batham</dc:creator>
      <dc:date>2023-01-30T20:00:22Z</dc:date>
    </item>
  </channel>
</rss>

