<?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 How to join data and extract field values as field names? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-data-and-extract-field-values-as-field-names/m-p/172219#M49343</link>
    <description>&lt;P&gt;How to change event field values into field name?&lt;/P&gt;

&lt;P&gt;Event log sample1:&lt;BR /&gt;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;BR /&gt;
id, code, message&lt;BR /&gt;
1,  1111, "one"&lt;BR /&gt;
3, 12345, "three"&lt;/P&gt;

&lt;P&gt;Event log sample2:&lt;BR /&gt;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`&lt;BR /&gt;
id, keyname, keyvalue&lt;BR /&gt;
1, name , john&lt;BR /&gt;
1, place, richmond&lt;BR /&gt;
1, activity, login&lt;BR /&gt;
1, environment,  mobile&lt;BR /&gt;
2, name , bob&lt;BR /&gt;
2, lastname, bill&lt;BR /&gt;
3, name,  charle&lt;BR /&gt;
3, location, newyork&lt;BR /&gt;
3, activity, transaction&lt;BR /&gt;
4  name,  Danny&lt;BR /&gt;
4  lastname, Huber&lt;BR /&gt;
5,  name, eugene&lt;/P&gt;

&lt;P&gt;Both event have common field called "id". I will join both data searches using join command.&lt;BR /&gt;
e.g: index=abc  code=111 | join id [search index=blah ]&lt;/P&gt;

&lt;P&gt;But my requirement is, for the above search when the code is 111, i need get the table in following format&lt;BR /&gt;
id, code, message, name, place, activity, environment&lt;BR /&gt;
1 , 1111, "one", john, richmond, login, mobile&lt;/P&gt;

&lt;P&gt;Please note that, the values of keyname and keyvalue are become field-name and its values respectively. Please let me know how to do this?&lt;/P&gt;</description>
    <pubDate>Wed, 06 Aug 2014 02:31:57 GMT</pubDate>
    <dc:creator>splunk_worker</dc:creator>
    <dc:date>2014-08-06T02:31:57Z</dc:date>
    <item>
      <title>How to join data and extract field values as field names?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-data-and-extract-field-values-as-field-names/m-p/172219#M49343</link>
      <description>&lt;P&gt;How to change event field values into field name?&lt;/P&gt;

&lt;P&gt;Event log sample1:&lt;BR /&gt;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;BR /&gt;
id, code, message&lt;BR /&gt;
1,  1111, "one"&lt;BR /&gt;
3, 12345, "three"&lt;/P&gt;

&lt;P&gt;Event log sample2:&lt;BR /&gt;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`&lt;BR /&gt;
id, keyname, keyvalue&lt;BR /&gt;
1, name , john&lt;BR /&gt;
1, place, richmond&lt;BR /&gt;
1, activity, login&lt;BR /&gt;
1, environment,  mobile&lt;BR /&gt;
2, name , bob&lt;BR /&gt;
2, lastname, bill&lt;BR /&gt;
3, name,  charle&lt;BR /&gt;
3, location, newyork&lt;BR /&gt;
3, activity, transaction&lt;BR /&gt;
4  name,  Danny&lt;BR /&gt;
4  lastname, Huber&lt;BR /&gt;
5,  name, eugene&lt;/P&gt;

&lt;P&gt;Both event have common field called "id". I will join both data searches using join command.&lt;BR /&gt;
e.g: index=abc  code=111 | join id [search index=blah ]&lt;/P&gt;

&lt;P&gt;But my requirement is, for the above search when the code is 111, i need get the table in following format&lt;BR /&gt;
id, code, message, name, place, activity, environment&lt;BR /&gt;
1 , 1111, "one", john, richmond, login, mobile&lt;/P&gt;

&lt;P&gt;Please note that, the values of keyname and keyvalue are become field-name and its values respectively. Please let me know how to do this?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Aug 2014 02:31:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-data-and-extract-field-values-as-field-names/m-p/172219#M49343</guid>
      <dc:creator>splunk_worker</dc:creator>
      <dc:date>2014-08-06T02:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to join data and extract field values as field names?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-data-and-extract-field-values-as-field-names/m-p/172220#M49344</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=abc  code=1111 | join id[search index=blah | chart first(keyvalue) by id keyname]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Aug 2014 07:32:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-data-and-extract-field-values-as-field-names/m-p/172220#M49344</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-08-06T07:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to join data and extract field values as field names?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-data-and-extract-field-values-as-field-names/m-p/172221#M49345</link>
      <description>&lt;P&gt;Thanks for ur response.&lt;/P&gt;

&lt;P&gt;The above searching is putting keyname parameter values as column variables (this 100% fine). But the value from keyvalue is displayed only for one column variable ( created from keyname) per id.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Aug 2014 12:57:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-data-and-extract-field-values-as-field-names/m-p/172221#M49345</guid>
      <dc:creator>splunk_worker</dc:creator>
      <dc:date>2014-08-06T12:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to join data and extract field values as field names?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-data-and-extract-field-values-as-field-names/m-p/172222#M49346</link>
      <description>&lt;P&gt;In your question, you said you need it for code 1111. Take out the condition code=1111 and execute the search.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Aug 2014 14:29:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-data-and-extract-field-values-as-field-names/m-p/172222#M49346</guid>
      <dc:creator>strive</dc:creator>
      <dc:date>2014-08-06T14:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to join data and extract field values as field names?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-join-data-and-extract-field-values-as-field-names/m-p/172223#M49347</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=abc code=1111 | join id [search index=blah | xyseries id keyname keyvalue]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR   &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=abc code=1111 | join id [search index=blah | chart first(keyvalue) over id by keyname]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Aug 2014 15:26:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-join-data-and-extract-field-values-as-field-names/m-p/172223#M49347</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-08-06T15:26:57Z</dc:date>
    </item>
  </channel>
</rss>

