<?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 run a python script to extract rows of data from a table? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-to-run-a-python-script-to-extract-rows-of-data-from-a-table/m-p/177664#M2380</link>
    <description>&lt;P&gt;Good morning,&lt;/P&gt;

&lt;P&gt;So I have a table of "name / disc / timestamp" and am trying to run a pre-written Python script on that specific name of server + corresponding disc. &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| python_pdc disk SAMPLE_SERVER "SAMPLE_DISC" | count(eval(percentage &amp;amp;lt; 90%))&lt;/CODE&gt;   ==&amp;gt;  One row of information.&lt;/P&gt;

&lt;P&gt;If I would like to repeat this process for the entire set of table, how could this be implemented?&lt;/P&gt;

&lt;P&gt;Thank you in advance,&lt;BR /&gt;
I would appreciate your input.&lt;BR /&gt;
Jack&lt;/P&gt;

&lt;P&gt;p.s.&lt;/P&gt;

&lt;P&gt;Table:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;name            disc      time
paoc2ock1d      D:        06/23/15
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;=&amp;gt; &lt;CODE&gt;| python_pdc disk  paoc2ock1d  "D:" | count(eval(percentage &amp;amp;lt; 90%))  as count&lt;/CODE&gt;&lt;BR /&gt;
Expected output:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;count       
2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 26 Jun 2015 13:33:15 GMT</pubDate>
    <dc:creator>minkyuk</dc:creator>
    <dc:date>2015-06-26T13:33:15Z</dc:date>
    <item>
      <title>How to run a python script to extract rows of data from a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-run-a-python-script-to-extract-rows-of-data-from-a-table/m-p/177664#M2380</link>
      <description>&lt;P&gt;Good morning,&lt;/P&gt;

&lt;P&gt;So I have a table of "name / disc / timestamp" and am trying to run a pre-written Python script on that specific name of server + corresponding disc. &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| python_pdc disk SAMPLE_SERVER "SAMPLE_DISC" | count(eval(percentage &amp;amp;lt; 90%))&lt;/CODE&gt;   ==&amp;gt;  One row of information.&lt;/P&gt;

&lt;P&gt;If I would like to repeat this process for the entire set of table, how could this be implemented?&lt;/P&gt;

&lt;P&gt;Thank you in advance,&lt;BR /&gt;
I would appreciate your input.&lt;BR /&gt;
Jack&lt;/P&gt;

&lt;P&gt;p.s.&lt;/P&gt;

&lt;P&gt;Table:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;name            disc      time
paoc2ock1d      D:        06/23/15
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;=&amp;gt; &lt;CODE&gt;| python_pdc disk  paoc2ock1d  "D:" | count(eval(percentage &amp;amp;lt; 90%))  as count&lt;/CODE&gt;&lt;BR /&gt;
Expected output:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;count       
2
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Jun 2015 13:33:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-run-a-python-script-to-extract-rows-of-data-from-a-table/m-p/177664#M2380</guid>
      <dc:creator>minkyuk</dc:creator>
      <dc:date>2015-06-26T13:33:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to run a python script to extract rows of data from a table?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-to-run-a-python-script-to-extract-rows-of-data-from-a-table/m-p/177665#M2381</link>
      <description>&lt;P&gt;1) Create a lookup table in Splunk with sample_server and sample_disc&lt;BR /&gt;
2) Run below command&lt;BR /&gt;
|inputlookup table.csv | fields sample_server sample_disc | python_pdc sample_server sample_disc | count(eval(percentage &amp;lt; 90%)) as count&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 20:23:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-to-run-a-python-script-to-extract-rows-of-data-from-a-table/m-p/177665#M2381</guid>
      <dc:creator>vinitatsky</dc:creator>
      <dc:date>2020-09-28T20:23:06Z</dc:date>
    </item>
  </channel>
</rss>

