<?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: Is it possible that add columns dynamically if values are available in same table in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-that-add-columns-dynamically-if-values-are/m-p/45604#M10839</link>
    <description>&lt;P&gt;You could achieve this by making use of the wildcard matching functionality for fields in &lt;CODE&gt;table&lt;/CODE&gt;. By specifying you want &lt;CODE&gt;product*&lt;/CODE&gt; included, Splunk will check what fields are available and include any matching ones as a table column.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | table name value id product*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The caveat is that you'll also get any other matching fields, so if you have a field called &lt;CODE&gt;productfoo&lt;/CODE&gt; the table will contain that as well.&lt;/P&gt;</description>
    <pubDate>Tue, 08 May 2012 09:55:19 GMT</pubDate>
    <dc:creator>Ayn</dc:creator>
    <dc:date>2012-05-08T09:55:19Z</dc:date>
    <item>
      <title>Is it possible that add columns dynamically if values are available in same table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-that-add-columns-dynamically-if-values-are/m-p/45603#M10838</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;

&lt;P&gt;Is it possible to add columns to the table dynamically (Runtime)if the values are available for that field else it should not show on same table.&lt;/P&gt;

&lt;P&gt;eg:1  name    value    id&lt;BR /&gt;&lt;BR /&gt;
       a         1      100&lt;/P&gt;

&lt;P&gt;2  name      value    id    product&lt;BR /&gt;
       b         2      200     xxxxx&lt;/P&gt;

&lt;P&gt;3   name      value    id&lt;BR /&gt;&lt;BR /&gt;
        v        3        300&lt;/P&gt;

&lt;P&gt;in second case product coulmn there is value available so it is showing it in the same table &lt;BR /&gt;
in first case for product coulmn no values available so it is not showing that coulmn&lt;BR /&gt;
in table is this possible.&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2012 09:41:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-that-add-columns-dynamically-if-values-are/m-p/45603#M10838</guid>
      <dc:creator>john</dc:creator>
      <dc:date>2012-05-08T09:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible that add columns dynamically if values are available in same table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-that-add-columns-dynamically-if-values-are/m-p/45604#M10839</link>
      <description>&lt;P&gt;You could achieve this by making use of the wildcard matching functionality for fields in &lt;CODE&gt;table&lt;/CODE&gt;. By specifying you want &lt;CODE&gt;product*&lt;/CODE&gt; included, Splunk will check what fields are available and include any matching ones as a table column.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | table name value id product*
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The caveat is that you'll also get any other matching fields, so if you have a field called &lt;CODE&gt;productfoo&lt;/CODE&gt; the table will contain that as well.&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2012 09:55:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-that-add-columns-dynamically-if-values-are/m-p/45604#M10839</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-05-08T09:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible that add columns dynamically if values are available in same table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-that-add-columns-dynamically-if-values-are/m-p/45605#M10840</link>
      <description>&lt;P&gt;hi Ayn my query is i dont want to show the column name also like in first row.That means 1st row product is not available so the header(Column name) also should not show come.&lt;/P&gt;

&lt;P&gt;this is the output what iam getting&lt;BR /&gt;
table name value id product*&lt;/P&gt;

&lt;P&gt;name    value   id   product &lt;/P&gt;

&lt;P&gt;a        1      100   &lt;/P&gt;

&lt;P&gt;what iam Excpting is that column(Product) should not come to that table if data not avialable for that.that is the user should know that there is a column named product is excisting until there is value available for that column.&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2012 10:55:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-that-add-columns-dynamically-if-values-are/m-p/45605#M10840</guid>
      <dc:creator>john</dc:creator>
      <dc:date>2012-05-08T10:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible that add columns dynamically if values are available in same table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-that-add-columns-dynamically-if-values-are/m-p/45606#M10841</link>
      <description>&lt;P&gt;If the &lt;CODE&gt;product&lt;/CODE&gt; field doesn't exist at all in your search, the &lt;CODE&gt;product&lt;/CODE&gt; column will not be present in your table. Do you perhaps have some event with the &lt;CODE&gt;product&lt;/CODE&gt; field and some others without it? In that case the column will be present.&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2012 11:13:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-that-add-columns-dynamically-if-values-are/m-p/45606#M10841</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-05-08T11:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible that add columns dynamically if values are available in same table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-that-add-columns-dynamically-if-values-are/m-p/45607#M10842</link>
      <description>&lt;P&gt;I am not sure,but product filed is not returning any value. But still coming in table. iam using regex to find a particular string that is not present in all events.So what i want is if it is present show it in table.If not present that column should not display in table with all null values.&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2012 11:44:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-that-add-columns-dynamically-if-values-are/m-p/45607#M10842</guid>
      <dc:creator>john</dc:creator>
      <dc:date>2012-05-08T11:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible that add columns dynamically if values are available in same table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-that-add-columns-dynamically-if-values-are/m-p/45608#M10843</link>
      <description>&lt;P&gt;In that case the technique I proposed will work. If &lt;CODE&gt;product&lt;/CODE&gt; is showing up in the table then, it is because at least one of the events in the table have a &lt;CODE&gt;product&lt;/CODE&gt; field with some value.&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2012 12:08:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-that-add-columns-dynamically-if-values-are/m-p/45608#M10843</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-05-08T12:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible that add columns dynamically if values are available in same table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-that-add-columns-dynamically-if-values-are/m-p/45609#M10844</link>
      <description>&lt;P&gt;Thanks Ayn...&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2012 12:24:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Is-it-possible-that-add-columns-dynamically-if-values-are/m-p/45609#M10844</guid>
      <dc:creator>john</dc:creator>
      <dc:date>2012-05-08T12:24:12Z</dc:date>
    </item>
  </channel>
</rss>

