<?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 rename columns in a chart that cam from nested json? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-rename-columns-in-a-chart-that-cam-from-nested-json/m-p/569459#M198476</link>
    <description>&lt;P&gt;I have a nested json element that gives back up to 8 field names. I table them like:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| table "Config.DiskBrandSize.*" &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which has child elements like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Barracuda: 100gb
Seagate: 50gb
Sandisk: 150gb&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I then sum them up:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| chart sum("Config.DiskBrandSize.*") &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and I get a table with columns like "sum(Config.DiskBrandSize{}.Sandisk)".&lt;/P&gt;&lt;P&gt;But I want to rename that to just something like "SandiskTotal" which is created from the column name + "Total", NOT do manual renames. I can't figure out how to do this with a foreach either.&lt;/P&gt;</description>
    <pubDate>Sat, 02 Oct 2021 23:50:18 GMT</pubDate>
    <dc:creator>thisissplunk</dc:creator>
    <dc:date>2021-10-02T23:50:18Z</dc:date>
    <item>
      <title>How to rename columns in a chart that cam from nested json?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-rename-columns-in-a-chart-that-cam-from-nested-json/m-p/569459#M198476</link>
      <description>&lt;P&gt;I have a nested json element that gives back up to 8 field names. I table them like:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| table "Config.DiskBrandSize.*" &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which has child elements like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Barracuda: 100gb
Seagate: 50gb
Sandisk: 150gb&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I then sum them up:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| chart sum("Config.DiskBrandSize.*") &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and I get a table with columns like "sum(Config.DiskBrandSize{}.Sandisk)".&lt;/P&gt;&lt;P&gt;But I want to rename that to just something like "SandiskTotal" which is created from the column name + "Total", NOT do manual renames. I can't figure out how to do this with a foreach either.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Oct 2021 23:50:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-rename-columns-in-a-chart-that-cam-from-nested-json/m-p/569459#M198476</guid>
      <dc:creator>thisissplunk</dc:creator>
      <dc:date>2021-10-02T23:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename columns in a chart that cam from nested json?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-rename-columns-in-a-chart-that-cam-from-nested-json/m-p/569460#M198477</link>
      <description>&lt;P&gt;I know you said no manual renames, but the &lt;FONT face="courier new,courier"&gt;rename&lt;/FONT&gt; command is the one to use.&amp;nbsp; &amp;nbsp;Like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rename "Config.DiskBrandSize.*" as *Total&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Oct 2021 00:08:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-rename-columns-in-a-chart-that-cam-from-nested-json/m-p/569460#M198477</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-10-03T00:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to rename columns in a chart that cam from nested json?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-rename-columns-in-a-chart-that-cam-from-nested-json/m-p/569461#M198478</link>
      <description>&lt;P&gt;Thanks, I didn't use rename but I used the same concept in the stats and chart commands.&lt;/P&gt;</description>
      <pubDate>Sun, 03 Oct 2021 01:33:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-rename-columns-in-a-chart-that-cam-from-nested-json/m-p/569461#M198478</guid>
      <dc:creator>thisissplunk</dc:creator>
      <dc:date>2021-10-03T01:33:09Z</dc:date>
    </item>
  </channel>
</rss>

