<?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 table doesn't have rising column totally? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Database-table-doesn-t-have-rising-column-totally/m-p/58208#M802</link>
    <description>&lt;P&gt;You actually don't need to replace &lt;CODE&gt;$rising_column$&lt;/CODE&gt;. It's automatically substituted with the column you specify as rising column in the input.&lt;/P&gt;

&lt;P&gt;Your custom sql query should rather look something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SELECT * FROM mytable WHERE $rising_column$ &amp;lt; dateadd(minute,-1,getdate()) {{AND $rising_column$ &amp;gt; ?}} ORDER BY $rising_column$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note that dateadd is used with &lt;CODE&gt;-1&lt;/CODE&gt; instead of &lt;CODE&gt;1&lt;/CODE&gt;, so entries are only fetched if they are at least one minute old.&lt;/P&gt;</description>
    <pubDate>Mon, 10 Dec 2012 14:59:35 GMT</pubDate>
    <dc:creator>ziegfried</dc:creator>
    <dc:date>2012-12-10T14:59:35Z</dc:date>
    <item>
      <title>Database table doesn't have rising column totally?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Database-table-doesn-t-have-rising-column-totally/m-p/58205#M799</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;My table doesn't have column with an inreasing value totally. It has ID, but that ID changes such that it often increases and sometimes decrease (but its value is unique), so i think it's not appropriate to be a rising column.&lt;/P&gt;

&lt;P&gt;There is another timestamp field,it often increases and sometimes keeps the same value when 2 events arrive at the same time. &lt;/P&gt;

&lt;P&gt;So my question is how to monitor my table ? Is that timestamp field possible to be rising column ?&lt;/P&gt;

&lt;P&gt;I need your help .&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2012 09:55:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Database-table-doesn-t-have-rising-column-totally/m-p/58205#M799</guid>
      <dc:creator>sieutruc</dc:creator>
      <dc:date>2012-12-10T09:55:53Z</dc:date>
    </item>
    <item>
      <title>Re: Database table doesn't have rising column totally?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Database-table-doesn-t-have-rising-column-totally/m-p/58206#M800</link>
      <description>&lt;P&gt;Multiple entries with the same rising-column value should not be a problem. The only thing where this might becomes a problem is when one of the entries with the same value is inserted into the table after the other one has already been fetched by DB Connect. There is a workaround for this situation by specifying a custom SQL statement for the database input:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SELECT * FROM mytable WHERE $rising_column$ &amp;lt; sysdate-(1/1440) {{AND $rising_column$ &amp;gt; ?}} ORDER BY $rising_column$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This forces that entries with a current timestamp are not fetched immediately, but the one of the subsequent invocations of the database input, when the timestamp is at least one minute older than the current system time. The query syntax is database specific. The example here is for Oracle.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2012 13:30:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Database-table-doesn-t-have-rising-column-totally/m-p/58206#M800</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2012-12-10T13:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: Database table doesn't have rising column totally?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Database-table-doesn-t-have-rising-column-totally/m-p/58207#M801</link>
      <description>&lt;P&gt;My rising column is modifiedTime, do i need to replace $rising_column$ by modifiedTime to have&lt;/P&gt;

&lt;P&gt;SELECT * FROM mytable WHERE modifiedTime &amp;lt; dateadd(minute,1,getdate()) {{AND modifiedTime &amp;gt; ?}} ORDER BY modifiedTime&lt;/P&gt;

&lt;P&gt;?? (MSSQL)&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2012 14:52:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Database-table-doesn-t-have-rising-column-totally/m-p/58207#M801</guid>
      <dc:creator>sieutruc</dc:creator>
      <dc:date>2012-12-10T14:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: Database table doesn't have rising column totally?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Database-table-doesn-t-have-rising-column-totally/m-p/58208#M802</link>
      <description>&lt;P&gt;You actually don't need to replace &lt;CODE&gt;$rising_column$&lt;/CODE&gt;. It's automatically substituted with the column you specify as rising column in the input.&lt;/P&gt;

&lt;P&gt;Your custom sql query should rather look something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SELECT * FROM mytable WHERE $rising_column$ &amp;lt; dateadd(minute,-1,getdate()) {{AND $rising_column$ &amp;gt; ?}} ORDER BY $rising_column$
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note that dateadd is used with &lt;CODE&gt;-1&lt;/CODE&gt; instead of &lt;CODE&gt;1&lt;/CODE&gt;, so entries are only fetched if they are at least one minute old.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2012 14:59:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Database-table-doesn-t-have-rising-column-totally/m-p/58208#M802</guid>
      <dc:creator>ziegfried</dc:creator>
      <dc:date>2012-12-10T14:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: Database table doesn't have rising column totally?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Database-table-doesn-t-have-rising-column-totally/m-p/58209#M803</link>
      <description>&lt;P&gt;sorry for my mistake :), it's worked now , thanks for your help&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2012 15:46:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Database-table-doesn-t-have-rising-column-totally/m-p/58209#M803</guid>
      <dc:creator>sieutruc</dc:creator>
      <dc:date>2012-12-10T15:46:38Z</dc:date>
    </item>
  </channel>
</rss>

