<?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: How to create a table from key value pairs which are not always present? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-table-from-key-value-pairs-which-are-not-always/m-p/598486#M104405</link>
    <description>&lt;LI-CODE lang="markup"&gt;| transpose 0 header_field=key column_name=key
| sort 0 key
| transpose 0 header_field=key column_name=key
| fields - key&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 19 May 2022 13:22:04 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2022-05-19T13:22:04Z</dc:date>
    <item>
      <title>How to create a table from key value pairs which are not always present?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-table-from-key-value-pairs-which-are-not-always/m-p/598386#M104384</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;I would like to extract a table. For instance:&lt;/P&gt;
&lt;P&gt;SOH is a special character&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Input&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;id=1, message body= [35=D&lt;FONT color="#808080"&gt;SOH&lt;/FONT&gt;45=C&lt;FONT color="#808080"&gt;SOH&lt;/FONT&gt;]&lt;/P&gt;
&lt;P&gt;id= 2, message body= [35=F&lt;FONT color="#808080"&gt;SOH&lt;FONT color="#000000"&gt;53=A&lt;/FONT&gt;SOH&lt;/FONT&gt;45=C&lt;FONT color="#808080"&gt;SOH&lt;/FONT&gt;]&lt;/P&gt;
&lt;P&gt;+10k messages as such&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Result&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;35&amp;nbsp; 45 53&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;D&amp;nbsp; &amp;nbsp; C&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;F&amp;nbsp; &amp;nbsp; &amp;nbsp;C&amp;nbsp; &amp;nbsp;A&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create headers with all keys provided through all messages.&lt;/P&gt;
&lt;P&gt;If key is not provided on message then cell should be empty.&lt;/P&gt;
&lt;P&gt;As you can see 53 is not always present, when that is the case its cell is empty.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2022 23:08:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-table-from-key-value-pairs-which-are-not-always/m-p/598386#M104384</guid>
      <dc:creator>MarietaO</dc:creator>
      <dc:date>2022-05-18T23:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a table from key value pairs which are not always present</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-table-from-key-value-pairs-which-are-not-always/m-p/598387#M104385</link>
      <description>&lt;LI-CODE lang="markup"&gt;| rex "35=(?&amp;lt;f35&amp;gt;\w+)SOH"
| rex "45=(?&amp;lt;f45&amp;gt;\w+)SOH"
| rex "53=(?&amp;lt;f53&amp;gt;\w+)SOH"&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 18 May 2022 21:08:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-table-from-key-value-pairs-which-are-not-always/m-p/598387#M104385</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-05-18T21:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a table from key value pairs which are not always present</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-table-from-key-value-pairs-which-are-not-always/m-p/598467#M104399</link>
      <description>&lt;P&gt;The contents of the body field are not indexed. SOH is an invisible character in ASCII.&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.eso.org/~ndelmott/ascii.html" target="_blank"&gt;SOH&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The unique keys&amp;nbsp; are unknown.&lt;/P&gt;&lt;P&gt;Body is indexed but not the key value pairs that I would like to transform to a table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 11:12:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-table-from-key-value-pairs-which-are-not-always/m-p/598467#M104399</guid>
      <dc:creator>MarietaO</dc:creator>
      <dc:date>2022-05-19T11:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a table from key value pairs which are not always present</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-table-from-key-value-pairs-which-are-not-always/m-p/598470#M104400</link>
      <description>&lt;P align="left"&gt;e.g. 8=FIX.4.1&amp;#1;9=90&amp;#1;35=0&amp;#1;49=INVMGR&amp;#1;56=BRKR&amp;#1;&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 11:28:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-table-from-key-value-pairs-which-are-not-always/m-p/598470#M104400</guid>
      <dc:creator>MarietaO</dc:creator>
      <dc:date>2022-05-19T11:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a table from key value pairs which are not always present</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-table-from-key-value-pairs-which-are-not-always/m-p/598473#M104401</link>
      <description>&lt;LI-CODE lang="markup"&gt;| rex max_match=0 "(?&amp;lt;_name&amp;gt;\d+)=(?&amp;lt;_value&amp;gt;\w+)\cA"
| eval namevalue=mvzip(_name, _value)
| mvexpand namevalue
| eval _name=mvindex(split(namevalue,","),0)
| eval _value=mvindex(split(namevalue,","),1)
| eval {_name}=_value
| fields - namevalue
| stats values(*) as * by _raw&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 19 May 2022 11:53:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-table-from-key-value-pairs-which-are-not-always/m-p/598473#M104401</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-05-19T11:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a table from key value pairs which are not always present?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-table-from-key-value-pairs-which-are-not-always/m-p/598476#M104402</link>
      <description>&lt;P&gt;Works, thanks a lot. And if I want to short by numeric values the columns e.g. asc.&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 12:38:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-table-from-key-value-pairs-which-are-not-always/m-p/598476#M104402</guid>
      <dc:creator>MarietaO</dc:creator>
      <dc:date>2022-05-19T12:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a table from key value pairs which are not always present?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-table-from-key-value-pairs-which-are-not-always/m-p/598480#M104403</link>
      <description>&lt;P&gt;Can you give an example of what you have and what you would like it to be?&lt;/P&gt;</description>
      <pubDate>Thu, 19 May 2022 13:00:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-table-from-key-value-pairs-which-are-not-always/m-p/598480#M104403</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-05-19T13:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a table from key value pairs which are not always present?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-table-from-key-value-pairs-which-are-not-always/m-p/598484#M104404</link>
      <description>&lt;P align="left"&gt;Sure, thanks a lot.&lt;/P&gt;&lt;P align="left"&gt;k1=1, k2=3,body=[8=FIX.4.1&amp;#1;9=90&amp;#1;35=0&amp;#1;49=INVMGR&amp;#1;56=BRKR&amp;#1;]&lt;/P&gt;&lt;P align="left"&gt;k1=1, k2=3, body=[8=FIX.4.1&amp;#1;1=10&amp;#1;35=0&amp;#1;49=INVMGR&amp;#1;58=BR&amp;#1;]&lt;/P&gt;&lt;P align="left"&gt;many key value pairs in body (not known).&lt;/P&gt;&lt;P align="left"&gt;order is numeric on columns.&lt;/P&gt;&lt;P align="left"&gt;To export to csv as a table.&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;&lt;STRONG&gt;9&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;&lt;STRONG&gt;35&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="12.5%" height="25px"&gt;&lt;STRONG&gt;49&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="6.25%"&gt;&lt;STRONG&gt;56&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD width="6.25%"&gt;&lt;STRONG&gt;58&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;90&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="12.5%" height="25px"&gt;INVMGR&lt;/TD&gt;&lt;TD width="6.25%"&gt;BRKR&lt;/TD&gt;&lt;TD width="6.25%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;10&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="12.5%" height="25px"&gt;INVMGR&lt;/TD&gt;&lt;TD width="6.25%"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="6.25%"&gt;BR&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 19 May 2022 13:15:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-table-from-key-value-pairs-which-are-not-always/m-p/598484#M104404</guid>
      <dc:creator>MarietaO</dc:creator>
      <dc:date>2022-05-19T13:15:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a table from key value pairs which are not always present?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-table-from-key-value-pairs-which-are-not-always/m-p/598486#M104405</link>
      <description>&lt;LI-CODE lang="markup"&gt;| transpose 0 header_field=key column_name=key
| sort 0 key
| transpose 0 header_field=key column_name=key
| fields - key&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 19 May 2022 13:22:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-table-from-key-value-pairs-which-are-not-always/m-p/598486#M104405</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-05-19T13:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a table from key value pairs which are not always present?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-table-from-key-value-pairs-which-are-not-always/m-p/598639#M104414</link>
      <description>&lt;P&gt;works perfectly thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2022 09:42:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-create-a-table-from-key-value-pairs-which-are-not-always/m-p/598639#M104414</guid>
      <dc:creator>MarietaO</dc:creator>
      <dc:date>2022-05-20T09:42:15Z</dc:date>
    </item>
  </channel>
</rss>

