<?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 parse the result retrieved from influxDB in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-the-result-retrieved-from-influxDB/m-p/469743#M80803</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw= "{\"series\":[{\"values\":[[\"2019-10-25T06:02:18.369115741Z\",\"A\",\"1\"],[\"2019-10-25T06:03:33.4004666Z\",\"B\",\"2\"],[\"2019-10-25T06:04:01.104011287Z\",\"C\",\"3\"],[\"2019-10-25T06:04:08.673023079Z\",\"D\",\"4\"]],\"columns\":[\"time\",\"field\",\"tag\"],\"name\":\"test_measurement\"}],\"statement_id\":0}"
`comment("this is sample data")`
| spath
| table series*
| foreach series{}.*{} 
    [rename &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; as &amp;lt;&amp;lt;MATCHSTR&amp;gt;&amp;gt;]
| mvexpand values
| streamstats reset_after="match(values,\"\d+$\")" count
| eval field_name=mvindex(columns,count -1)
| streamstats count(eval(field_name=="time")) as tmp
| xyseries tmp field_name values
| table time field tag
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hi, how about this?&lt;/P&gt;</description>
    <pubDate>Sat, 26 Oct 2019 00:22:51 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2019-10-26T00:22:51Z</dc:date>
    <item>
      <title>How to parse the result retrieved from influxDB</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-the-result-retrieved-from-influxDB/m-p/469742#M80802</link>
      <description>&lt;P&gt;i try to retrieve data from influxDB. but I don't know how to parse the result that columns and values are separated.&lt;BR /&gt;
&lt;CODE&gt;&lt;BR /&gt;
| makeresults   &lt;BR /&gt;
| eval results= {"series":[{"values":[["2019-10-25T06:02:18.369115741Z","A","1"],["2019-10-25T06:03:33.4004666Z","B","2"],["2019-10-25T06:04:01.104011287Z","C","3"],["2019-10-25T06:04:08.673023079Z","D","4"]],"columns":["time","field","tag"],"name":"test_measurement"}],"statement_id":0}  &lt;BR /&gt;
| ???&lt;BR /&gt;
&lt;/CODE&gt;&lt;BR /&gt;
can it be transformed into the table below?  &lt;/P&gt;

&lt;P&gt;|time|field|tag|&lt;BR /&gt;&lt;BR /&gt;
|2019-10-25T06:02:18.369115741Z|A|1|&lt;BR /&gt;&lt;BR /&gt;
|2019-10-25T06:03:33.4004666Z|B|2|&lt;BR /&gt;&lt;BR /&gt;
|2019-10-25T06:04:01.104011287Z|C|3|&lt;BR /&gt;&lt;BR /&gt;
|2019-10-25T06:04:08.673023079Z|D|4|   &lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2019 09:07:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-the-result-retrieved-from-influxDB/m-p/469742#M80802</guid>
      <dc:creator>u191477</dc:creator>
      <dc:date>2019-10-25T09:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse the result retrieved from influxDB</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-the-result-retrieved-from-influxDB/m-p/469743#M80803</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw= "{\"series\":[{\"values\":[[\"2019-10-25T06:02:18.369115741Z\",\"A\",\"1\"],[\"2019-10-25T06:03:33.4004666Z\",\"B\",\"2\"],[\"2019-10-25T06:04:01.104011287Z\",\"C\",\"3\"],[\"2019-10-25T06:04:08.673023079Z\",\"D\",\"4\"]],\"columns\":[\"time\",\"field\",\"tag\"],\"name\":\"test_measurement\"}],\"statement_id\":0}"
`comment("this is sample data")`
| spath
| table series*
| foreach series{}.*{} 
    [rename &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; as &amp;lt;&amp;lt;MATCHSTR&amp;gt;&amp;gt;]
| mvexpand values
| streamstats reset_after="match(values,\"\d+$\")" count
| eval field_name=mvindex(columns,count -1)
| streamstats count(eval(field_name=="time")) as tmp
| xyseries tmp field_name values
| table time field tag
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hi, how about this?&lt;/P&gt;</description>
      <pubDate>Sat, 26 Oct 2019 00:22:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-the-result-retrieved-from-influxDB/m-p/469743#M80803</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-10-26T00:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse the result retrieved from influxDB</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-the-result-retrieved-from-influxDB/m-p/469744#M80804</link>
      <description>&lt;P&gt;i really appreciate it!!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 06:49:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-the-result-retrieved-from-influxDB/m-p/469744#M80804</guid>
      <dc:creator>u191477</dc:creator>
      <dc:date>2019-10-28T06:49:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse the result retrieved from influxDB</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-the-result-retrieved-from-influxDB/m-p/469745#M80805</link>
      <description>&lt;P&gt;your welcome, Happy Splunking.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 10:49:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-the-result-retrieved-from-influxDB/m-p/469745#M80805</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2019-10-28T10:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to parse the result retrieved from influxDB</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-the-result-retrieved-from-influxDB/m-p/605934#M105313</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213214"&gt;@u191477&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/184221"&gt;@to4kawa&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;did you connect splunkdb with influxdb?&lt;/P&gt;&lt;P&gt;i try it but got error:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Search/driver-influxdb-to-splunk-db/m-p/605850#M210681" target="_blank"&gt;https://community.splunk.com/t5/Splunk-Search/driver-influxdb-to-splunk-db/m-p/605850#M210681&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;would please how do you do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 06:48:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-parse-the-result-retrieved-from-influxDB/m-p/605934#M105313</guid>
      <dc:creator>indeed_2000</dc:creator>
      <dc:date>2022-07-18T06:48:43Z</dc:date>
    </item>
  </channel>
</rss>

