<?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 DBConnect SQLite not picking proper timestamp in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/DBConnect-SQLite-not-picking-proper-timestamp/m-p/212470#M41779</link>
    <description>&lt;P&gt;Hi All&lt;/P&gt;

&lt;P&gt;I have an SQLite input setup via DBConnect app .&lt;/P&gt;

&lt;P&gt;However the input DBMON tail will just NOT parse proper timestamp..&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;The ingest date with default time of 00:59:59.999 are always selected&lt;BR /&gt;
e.g. 04/01/2017  00:59:59.999&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I always get below for several config tries..&lt;/P&gt;

&lt;P&gt;Ingested data:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;04/01/2017 00:59:59.999&lt;/STRONG&gt; Id=2011 Severity=2|  ..... |...&lt;/P&gt;

&lt;P&gt;The entry in DB table looks like:&lt;/P&gt;

&lt;P&gt;2001|2|Invalid XML|&lt;STRONG&gt;2017-01-03 10:44:20&lt;/STRONG&gt;|Alrming rate of alarms in alarm |9fd22f2-&lt;BR /&gt;
g2q-f2f2fe32e2fe|5|f2f22f3-t2c3crr31-c14c14|Nice123|421123|0&lt;/P&gt;

&lt;P&gt;Below is set in the Timestamp format option:&lt;/P&gt;

&lt;P&gt;yyyy-MM-dd HH:mm:ss.SSS&lt;/P&gt;

&lt;P&gt;Timestamp column name is proper ( column name is Timestamp).&lt;/P&gt;

&lt;P&gt;Any suggestions please?&lt;/P&gt;</description>
    <pubDate>Tue, 03 Jan 2017 11:50:54 GMT</pubDate>
    <dc:creator>stanwin</dc:creator>
    <dc:date>2017-01-03T11:50:54Z</dc:date>
    <item>
      <title>DBConnect SQLite not picking proper timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/DBConnect-SQLite-not-picking-proper-timestamp/m-p/212470#M41779</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;

&lt;P&gt;I have an SQLite input setup via DBConnect app .&lt;/P&gt;

&lt;P&gt;However the input DBMON tail will just NOT parse proper timestamp..&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;The ingest date with default time of 00:59:59.999 are always selected&lt;BR /&gt;
e.g. 04/01/2017  00:59:59.999&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I always get below for several config tries..&lt;/P&gt;

&lt;P&gt;Ingested data:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;04/01/2017 00:59:59.999&lt;/STRONG&gt; Id=2011 Severity=2|  ..... |...&lt;/P&gt;

&lt;P&gt;The entry in DB table looks like:&lt;/P&gt;

&lt;P&gt;2001|2|Invalid XML|&lt;STRONG&gt;2017-01-03 10:44:20&lt;/STRONG&gt;|Alrming rate of alarms in alarm |9fd22f2-&lt;BR /&gt;
g2q-f2f2fe32e2fe|5|f2f22f3-t2c3crr31-c14c14|Nice123|421123|0&lt;/P&gt;

&lt;P&gt;Below is set in the Timestamp format option:&lt;/P&gt;

&lt;P&gt;yyyy-MM-dd HH:mm:ss.SSS&lt;/P&gt;

&lt;P&gt;Timestamp column name is proper ( column name is Timestamp).&lt;/P&gt;

&lt;P&gt;Any suggestions please?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2017 11:50:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/DBConnect-SQLite-not-picking-proper-timestamp/m-p/212470#M41779</guid>
      <dc:creator>stanwin</dc:creator>
      <dc:date>2017-01-03T11:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: DBConnect SQLite not picking proper timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/DBConnect-SQLite-not-picking-proper-timestamp/m-p/212471#M41780</link>
      <description>&lt;P&gt;DBMON tail query used ( facing the issue):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[dbmon-tail://stanSQLite/SQLight_rowid]
host = chloServer
index = main
interval = 5,11,13,17,20,24,27,33,39,44,49,54,59 * * * *
output.format = kv
output.timestamp = 1
output.timestamp.column = TimeColumn
output.timestamp.format = yyyy-MM-dd HH:mm:ss.SSS
query = SELECT Id  , Severity  , Description  , Timestamp as TimeColumn  , ModelName  , ModelId  , ModelType  , ParentId  , SolutionFileName  , ActionId  , HasAnotherLevel , rowid  FROM Event {{WHERE $rising_column$ &amp;gt; ?}}
source = dbmon-tail://stanSQLite/timestamp_as
sourcetype = dbmon:kv
table = SQLite_tailer
tail.rising.column = rowid
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Jan 2017 12:24:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/DBConnect-SQLite-not-picking-proper-timestamp/m-p/212471#M41780</guid>
      <dc:creator>stanwin</dc:creator>
      <dc:date>2017-01-03T12:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: DBConnect SQLite not picking proper timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/DBConnect-SQLite-not-picking-proper-timestamp/m-p/212472#M41781</link>
      <description>&lt;P&gt;Hi @stanwin&lt;/P&gt;

&lt;P&gt;Is this the actual answer to your question, or were you just providing additional context for your issue? &lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2017 00:47:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/DBConnect-SQLite-not-picking-proper-timestamp/m-p/212472#M41781</guid>
      <dc:creator>ppablo</dc:creator>
      <dc:date>2017-01-04T00:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: DBConnect SQLite not picking proper timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/DBConnect-SQLite-not-picking-proper-timestamp/m-p/212473#M41782</link>
      <description>&lt;P&gt;Hey Pablo&lt;/P&gt;

&lt;P&gt;yes , sorry that wasn't very clear. I was providing context..&lt;/P&gt;

&lt;P&gt;I have tried below solutions :&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;Rename the column in select query &amp;amp; use that for timestamp column&lt;/LI&gt;
&lt;LI&gt;Altered for several version of Java Date Format . Current one is yyyy-MM-dd HH:mm:ss.SSS&lt;/LI&gt;
&lt;LI&gt;tochar is not available for SQLite , this is one of main workarounds for other DBs&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Wed, 04 Jan 2017 10:15:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/DBConnect-SQLite-not-picking-proper-timestamp/m-p/212473#M41782</guid>
      <dc:creator>stanwin</dc:creator>
      <dc:date>2017-01-04T10:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: DBConnect SQLite not picking proper timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/DBConnect-SQLite-not-picking-proper-timestamp/m-p/212474#M41783</link>
      <description>&lt;P&gt;Changing the java date format around just alters the format but resultant times picked are same:&lt;/P&gt;

&lt;P&gt;_time                       _raw&lt;BR /&gt;
2017-01-04 00:59:59.999     &lt;STRONG&gt;01-01-1970&lt;/STRONG&gt; 00:59:59.999 Id=2055 Severity=2 Description=LA&lt;BR /&gt;
2017-01-04 00:59:59.999     &lt;STRONG&gt;1970-01-01&lt;/STRONG&gt; 00:59:59.999 Id=2037 Severity=2 Description="&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jan 2017 14:42:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/DBConnect-SQLite-not-picking-proper-timestamp/m-p/212474#M41783</guid>
      <dc:creator>stanwin</dc:creator>
      <dc:date>2017-01-04T14:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: DBConnect SQLite not picking proper timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/DBConnect-SQLite-not-picking-proper-timestamp/m-p/212475#M41784</link>
      <description>&lt;P&gt;I do not see any milliseconds in the time string from your example.  Try dropping the .SSS from the end of the timestamp format.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 14:38:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/DBConnect-SQLite-not-picking-proper-timestamp/m-p/212475#M41784</guid>
      <dc:creator>sjohnson_splunk</dc:creator>
      <dc:date>2017-01-05T14:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: DBConnect SQLite not picking proper timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/DBConnect-SQLite-not-picking-proper-timestamp/m-p/212476#M41785</link>
      <description>&lt;P&gt;Is the column a string or in datetime format? DB Connect requires datetime format - it won't take a string or integer timestamp properly (as regular Splunk can). If it's a string, just modify your query to cast to datetime.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 14:39:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/DBConnect-SQLite-not-picking-proper-timestamp/m-p/212476#M41785</guid>
      <dc:creator>adambloom</dc:creator>
      <dc:date>2017-01-05T14:39:30Z</dc:date>
    </item>
    <item>
      <title>Re: DBConnect SQLite not picking proper timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/DBConnect-SQLite-not-picking-proper-timestamp/m-p/212477#M41786</link>
      <description>&lt;P&gt;Hello sjohnson&lt;/P&gt;

&lt;P&gt;Tried this already. it doesn't help. Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 16:42:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/DBConnect-SQLite-not-picking-proper-timestamp/m-p/212477#M41786</guid>
      <dc:creator>stanwin</dc:creator>
      <dc:date>2017-01-05T16:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: DBConnect SQLite not picking proper timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/DBConnect-SQLite-not-picking-proper-timestamp/m-p/212478#M41787</link>
      <description>&lt;P&gt;Done solved!&lt;/P&gt;

&lt;P&gt;SQLite has no date or timestamp data type! &lt;STRONG&gt;The only way I could get it to work is for SPLUNK to automatically select &amp;amp; parse the Timestamp without specifying   the Timestamp column or Timestamp format!&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;There is NO Need to cast to datetime &amp;amp; it will work will the normal text also.. But i preferred to do below ..&lt;/P&gt;

&lt;P&gt;SELECT Id  , Severity  , Description  ,  &lt;STRONG&gt;datetime(timestamp) as timestampCol&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Arguably it will mean SPLUNK will parse through the ingest looking for timestamp but I have no option but to leave it that way . Have tried below combinations to NO avail:&lt;/P&gt;

&lt;UL&gt;
&lt;LI&gt;select timestamp column &amp;amp; specify timestamp format&lt;/LI&gt;
&lt;LI&gt;use datetime with timestamp column and specify timestamp format&lt;/LI&gt;
&lt;LI&gt;Various alterations of timestamp format with timestamp column&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;&lt;A href="https://www.sqlite.org/datatype3.html"&gt;https://www.sqlite.org/datatype3.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www.sqlite.org/lang_datefunc.html"&gt;http://www.sqlite.org/lang_datefunc.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 19:59:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/DBConnect-SQLite-not-picking-proper-timestamp/m-p/212478#M41787</guid>
      <dc:creator>stanwin</dc:creator>
      <dc:date>2017-01-05T19:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: DBConnect SQLite not picking proper timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/DBConnect-SQLite-not-picking-proper-timestamp/m-p/212479#M41788</link>
      <description>&lt;P&gt;Didnt work  that way either, after long researching realised that although TIMESTAMP was the datatype SQLIte will effectively accept anything declared as a datatype!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2017 20:01:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/DBConnect-SQLite-not-picking-proper-timestamp/m-p/212479#M41788</guid>
      <dc:creator>stanwin</dc:creator>
      <dc:date>2017-01-05T20:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: DBConnect SQLite not picking proper timestamp</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/DBConnect-SQLite-not-picking-proper-timestamp/m-p/212480#M41789</link>
      <description>&lt;P&gt;On a side note.. &lt;/P&gt;

&lt;P&gt;I tried using DBX version 2 (2.4.0)  which does not have th SQLite support by default&lt;/P&gt;

&lt;P&gt;But the driver would just NOT show up in list until i added the db types entry to the &lt;STRONG&gt;default&lt;/STRONG&gt; db_connection_types.conf instead of local!!&lt;/P&gt;

&lt;P&gt;Above accepted answer was tested on DBX version 1. 2.2.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 12:19:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/DBConnect-SQLite-not-picking-proper-timestamp/m-p/212480#M41789</guid>
      <dc:creator>stanwin</dc:creator>
      <dc:date>2020-09-29T12:19:07Z</dc:date>
    </item>
  </channel>
</rss>

