<?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: database conditional input in Knowledge Management</title>
    <link>https://community.splunk.com/t5/Knowledge-Management/database-conditional-input/m-p/375763#M6052</link>
    <description>&lt;P&gt;sure, I give you an example (just seudo code):&lt;/P&gt;

&lt;P&gt;something like... &lt;CODE&gt;dbxquery &amp;lt; param&amp;gt; "SELECT * FROM Customer where Cust_NUM &amp;gt; "100" | search index=customer| if (customer) exits then "add the event into index" else skip&lt;/CODE&gt;   &lt;/P&gt;

&lt;P&gt;Is it more clear now?&lt;/P&gt;</description>
    <pubDate>Sun, 06 May 2018 22:13:53 GMT</pubDate>
    <dc:creator>hugohctint</dc:creator>
    <dc:date>2018-05-06T22:13:53Z</dc:date>
    <item>
      <title>database conditional input</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/database-conditional-input/m-p/375761#M6050</link>
      <description>&lt;P&gt;I have an oracle database connection that I need to run a select and look for records and then check whether or not each one if does not exist needs to be included as a new event. I had set a dbconnect input but I do not thing it would accept any conditional command against an index or sourcetype. &lt;/P&gt;

&lt;P&gt;Thanks in advance for your help&lt;/P&gt;</description>
      <pubDate>Sun, 06 May 2018 18:55:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/database-conditional-input/m-p/375761#M6050</guid>
      <dc:creator>hugohctint</dc:creator>
      <dc:date>2018-05-06T18:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: database conditional input</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/database-conditional-input/m-p/375762#M6051</link>
      <description>&lt;P&gt;I do not get the "look for" and "check whether" parts.  We need much more detail here.&lt;/P&gt;</description>
      <pubDate>Sun, 06 May 2018 19:01:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/database-conditional-input/m-p/375762#M6051</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-05-06T19:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: database conditional input</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/database-conditional-input/m-p/375763#M6052</link>
      <description>&lt;P&gt;sure, I give you an example (just seudo code):&lt;/P&gt;

&lt;P&gt;something like... &lt;CODE&gt;dbxquery &amp;lt; param&amp;gt; "SELECT * FROM Customer where Cust_NUM &amp;gt; "100" | search index=customer| if (customer) exits then "add the event into index" else skip&lt;/CODE&gt;   &lt;/P&gt;

&lt;P&gt;Is it more clear now?&lt;/P&gt;</description>
      <pubDate>Sun, 06 May 2018 22:13:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/database-conditional-input/m-p/375763#M6052</guid>
      <dc:creator>hugohctint</dc:creator>
      <dc:date>2018-05-06T22:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: database conditional input</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/database-conditional-input/m-p/375764#M6053</link>
      <description>&lt;P&gt;sure, I give you an example (just seudo code):&lt;/P&gt;

&lt;P&gt;something like... dbxquery &amp;lt; param&amp;gt; "SELECT * FROM Customer where Cust_NUM &amp;gt; "100" | search index=customer| if (customer) exits then "add the event into index" else skip   &lt;/P&gt;

&lt;P&gt;Is it more clear now?&lt;/P&gt;</description>
      <pubDate>Sun, 06 May 2018 22:13:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/database-conditional-input/m-p/375764#M6053</guid>
      <dc:creator>hugohctint</dc:creator>
      <dc:date>2018-05-06T22:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: database conditional input</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/database-conditional-input/m-p/375765#M6054</link>
      <description>&lt;P&gt;Now we are talking; try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=customer
| stats count by customer
| table customer
| rename customer AS dropme
| format "customer IN(" "" "" "," "" ")"
| rex field=search mode=sed "s/dropme=//g s/,\s*\)/)/"
| map search="|dbxquery ... \"SELECT * FROM Cust_NUM &amp;gt; \"100\" AND $search$\""
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 07 May 2018 01:05:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/database-conditional-input/m-p/375765#M6054</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2018-05-07T01:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: database conditional input</title>
      <link>https://community.splunk.com/t5/Knowledge-Management/database-conditional-input/m-p/375766#M6055</link>
      <description>&lt;P&gt;Hello Woodcock,&lt;BR /&gt;
It think It is actually the other way. I need to find records on the database SELECT statement under a condition and then check if if they do not exist in the index as an event. Only if the new value does not exist in the index I need to "insert it" as a new event on the index.&lt;/P&gt;</description>
      <pubDate>Mon, 07 May 2018 18:39:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Knowledge-Management/database-conditional-input/m-p/375766#M6055</guid>
      <dc:creator>hugohctint</dc:creator>
      <dc:date>2018-05-07T18:39:29Z</dc:date>
    </item>
  </channel>
</rss>

