<?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: DBX not outputing SQL DateTime Timestamp in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133292#M184652</link>
    <description>&lt;P&gt;This is my final stanza in inputs.conf&lt;/P&gt;

&lt;P&gt;[dbmon-tail://mydb/mytail13]&lt;BR /&gt;
interval = 60&lt;BR /&gt;
output.format = kv&lt;BR /&gt;
output.timestamp = 1&lt;BR /&gt;
output.timestamp.column = last_datetime&lt;BR /&gt;
query = select last_datetime, first_name, actor_id from actor where last_datetime &amp;gt; TIMESTAMP('2013-06-07') {{ and $rising_column$ &amp;gt; ? }}&lt;BR /&gt;
table = actor&lt;BR /&gt;
tail.rising.column = actor_id&lt;/P&gt;

&lt;P&gt;I didn't see any problem. I used manager UI to configure dbmon.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 15:16:27 GMT</pubDate>
    <dc:creator>btsay_splunk</dc:creator>
    <dc:date>2020-09-28T15:16:27Z</dc:date>
    <item>
      <title>DBX not outputing SQL DateTime Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133276#M184636</link>
      <description>&lt;P&gt;I have a  Splunk DB Connect input setup that simply runs a sql query to grab events from sql.&lt;BR /&gt;
I have a template as my output.&lt;BR /&gt;
The column name is EventDate. I set the timestamp column to EventDate and set $EventDate$ in the template for a different field. Both of these are coming back with blank as the timestamp.&lt;BR /&gt;
I run the query within the DB Query feature of dbx and it comes back with dates.&lt;BR /&gt;
This is the only column that is not coming back with data.&lt;BR /&gt;
I have tried to convert it to a string and do a custom timestamp output format, but I am still getting back blank.&lt;/P&gt;

&lt;P&gt;The version of Splunk DB Connect I have tried this with are 1.1.0-179259 and the latest (1.1.1-185178)&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2013 17:00:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133276#M184636</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2013-11-07T17:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: DBX not outputing SQL DateTime Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133277#M184637</link>
      <description>&lt;P&gt;You do not need to use $EventDate$.  Use the column name as is in the Timestamp field of the Database input configuration screen: EventDate&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2013 17:55:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133277#M184637</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2013-11-07T17:55:41Z</dc:date>
    </item>
    <item>
      <title>Re: DBX not outputing SQL DateTime Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133278#M184638</link>
      <description>&lt;P&gt;Do not use $EventDate$ in the output template? &lt;BR /&gt;
And yes EventDate is in the timestamp field&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2013 17:57:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133278#M184638</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2013-11-07T17:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: DBX not outputing SQL DateTime Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133279#M184639</link>
      <description>&lt;P&gt;Correct, you don't use the $.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2013 19:00:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133279#M184639</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2013-11-07T19:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: DBX not outputing SQL DateTime Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133280#M184640</link>
      <description>&lt;P&gt;Then how does it know that it is not just apart of the template words? All the other SQL fields have dollar signs around them within the template and are replaced with the SQL values.&lt;/P&gt;

&lt;P&gt;EventDate is already in the "Timestamp column" field.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2013 19:18:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133280#M184640</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2013-11-07T19:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: DBX not outputing SQL DateTime Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133281#M184641</link>
      <description>&lt;P&gt;Apparently this is a known issue per their documentation&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/DBX/latest/DeployDBX/Releasenotes#Known_issues"&gt;http://docs.splunk.com/Documentation/DBX/latest/DeployDBX/Releasenotes#Known_issues&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;When using a template as the database output format, timestamp data is not output correctly. (DBX-312)&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2013 22:34:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133281#M184641</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2013-11-07T22:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: DBX not outputing SQL DateTime Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133282#M184642</link>
      <description>&lt;P&gt;{{ where $rising_column$ &amp;gt; ? }} or where ... {{ and $rising_column$ &amp;gt; ? }}&lt;/P&gt;

&lt;P&gt;This $rising_column$ is the only valid syntax, it cannot be other column names such as your case $EventData$. Instead, the rising_column will be taken from Text Field "Rising Column", that is the place you put "eventdata" there.&lt;/P&gt;

&lt;P&gt;$rising_column$ is only meanful for Tail Input, not for Dump input.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:15:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133282#M184642</guid>
      <dc:creator>btsay_splunk</dc:creator>
      <dc:date>2020-09-28T15:15:49Z</dc:date>
    </item>
    <item>
      <title>Re: DBX not outputing SQL DateTime Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133283#M184643</link>
      <description>&lt;P&gt;my rising column is an ID field and that part is working fine, it returns the appropriate number of records, however all the fields are returned except it does not like the datetime column from sql.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2013 21:55:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133283#M184643</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2013-11-12T21:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: DBX not outputing SQL DateTime Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133284#M184644</link>
      <description>&lt;P&gt;what is your eventdate SQL type? timestamp column for timestamp field name that is eventdate in your case. Currently dbconnect recognizes TIMESTAMP and DATE two SQL types, others will be treated as String in your own format if you provided and be parsed by timestamp parse format that you can set it up in conf file.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2013 22:16:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133284#M184644</guid>
      <dc:creator>btsay_splunk</dc:creator>
      <dc:date>2013-11-12T22:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: DBX not outputing SQL DateTime Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133285#M184645</link>
      <description>&lt;P&gt;datetime is my SQL type (note: this was working fine before 1.1.1)&lt;/P&gt;

&lt;P&gt;is date recognized and not datetime? (For a TIME stamp)?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2013 22:18:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133285#M184645</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2013-11-12T22:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: DBX not outputing SQL DateTime Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133286#M184646</link>
      <description>&lt;P&gt;Can you use lower case for the column name for a test? Will it be possible that you give me a copy of your local/inputs.conf or just the stanza in this file that you failed in Timestamp.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2013 01:01:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133286#M184646</guid>
      <dc:creator>btsay_splunk</dc:creator>
      <dc:date>2013-11-13T01:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: DBX not outputing SQL DateTime Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133287#M184647</link>
      <description>&lt;P&gt;I have tried lower casing the column name in the queries to sql as well as the output.timestamp.column and template&lt;BR /&gt;
host = myHost.company.com&lt;BR /&gt;
index = myIndex&lt;BR /&gt;
interval = 60&lt;BR /&gt;
output.format = template&lt;BR /&gt;
output.template = (leaving off as it won't fit)&lt;BR /&gt;
output.timestamp = 1&lt;BR /&gt;
output.timestamp.column = EventDate&lt;BR /&gt;
query = SELECT ID,EventDate,Server,Application,CallingApplication,Layer,Category,Level,Duration,Key,Summary,Session,CallingSession,Message FROM dbo.MyLogDB WITH(NOLOCK) WHERE EventDate &amp;gt; '11/07/2013 13:32:00' {{ AND $rising_column$ &amp;gt; ? }}&lt;BR /&gt;
sourcetype = myLogs&lt;BR /&gt;
table = MyTable&lt;BR /&gt;
tail.rising.column = ID&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2013 14:30:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133287#M184647</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2013-11-13T14:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: DBX not outputing SQL DateTime Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133288#M184648</link>
      <description>&lt;P&gt;I used mysql database for a test: here is my SQL:&lt;/P&gt;

&lt;P&gt;select * from actor where last_update &amp;gt; TIMESTAMP('11-07-2013') {{ and $rising_column$ &amp;gt; ? }}&lt;/P&gt;

&lt;P&gt;It seems to work fine.&lt;/P&gt;

&lt;P&gt;I think the comparison of datetime or timestamp will be safer if you convert the string value into timestamp value from function.&lt;/P&gt;

&lt;P&gt;if you have other jdbc based db tool, like dbvisualizer, you can test your SQL to see if that is working fine. DBConnect only takes whatever SQL you provided to run jdbc call, if the SQL is working in the tool, it should be running in dbconnect as well.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:16:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133288#M184648</guid>
      <dc:creator>btsay_splunk</dc:creator>
      <dc:date>2020-09-28T15:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: DBX not outputing SQL DateTime Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133289#M184649</link>
      <description>&lt;P&gt;Have you tried last_update being a datetime Sql data type?&lt;/P&gt;

&lt;P&gt;I can tell the query is running just fine, as it is giving me the correct # of records and filling in every other field.&lt;/P&gt;

&lt;P&gt;I will also note that i did test my Query using DBQuery in db connect and it worked fine there as well.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2013 17:36:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133289#M184649</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2013-11-13T17:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: DBX not outputing SQL DateTime Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133290#M184650</link>
      <description>&lt;P&gt;still in mysql test: I did&lt;/P&gt;

&lt;P&gt;select * from actor where last_datetime &amp;gt; TIMESTAMP('11-07-2013') {{ and $rising_column$ &amp;gt; ? }}&lt;/P&gt;

&lt;P&gt;the last_datetime is datetime type now.&lt;/P&gt;

&lt;P&gt;dbconnect does the following -- &lt;BR /&gt;
1. initial step, takes the sql without {{ ... }} part to run and get values, save the last value of rising_column&lt;BR /&gt;
2. post init steps, combines the rising_column to a SQL in my case it is:&lt;/P&gt;

&lt;P&gt;select * from actor where last_datetime &amp;gt; TIMESTAMP('11-07-2013') and actor_id &amp;gt; ? &lt;/P&gt;

&lt;P&gt;and runs it with the saved actor_id as starting record.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:16:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133290#M184650</guid>
      <dc:creator>btsay_splunk</dc:creator>
      <dc:date>2020-09-28T15:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: DBX not outputing SQL DateTime Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133291#M184651</link>
      <description>&lt;P&gt;did you have an output type of "template" with the $last_datetime$ within the template as well as your timestamp?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2013 18:00:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133291#M184651</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2013-11-13T18:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: DBX not outputing SQL DateTime Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133292#M184652</link>
      <description>&lt;P&gt;This is my final stanza in inputs.conf&lt;/P&gt;

&lt;P&gt;[dbmon-tail://mydb/mytail13]&lt;BR /&gt;
interval = 60&lt;BR /&gt;
output.format = kv&lt;BR /&gt;
output.timestamp = 1&lt;BR /&gt;
output.timestamp.column = last_datetime&lt;BR /&gt;
query = select last_datetime, first_name, actor_id from actor where last_datetime &amp;gt; TIMESTAMP('2013-06-07') {{ and $rising_column$ &amp;gt; ? }}&lt;BR /&gt;
table = actor&lt;BR /&gt;
tail.rising.column = actor_id&lt;/P&gt;

&lt;P&gt;I didn't see any problem. I used manager UI to configure dbmon.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:16:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133292#M184652</guid>
      <dc:creator>btsay_splunk</dc:creator>
      <dc:date>2020-09-28T15:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: DBX not outputing SQL DateTime Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133293#M184653</link>
      <description>&lt;P&gt;the difference between ours is that our output formats are different, &lt;BR /&gt;
output.format = template&lt;BR /&gt;
output.template = &lt;EVENTDATE&gt;$EventDate$&lt;/EVENTDATE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2013 18:52:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133293#M184653</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2013-11-13T18:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: DBX not outputing SQL DateTime Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133294#M184654</link>
      <description>&lt;P&gt;ok, puzzle resolved! The output.template should be:&lt;/P&gt;

&lt;P&gt;&lt;EVENTDATE&gt;$timestamp$&lt;/EVENTDATE&gt;&lt;/P&gt;

&lt;P&gt;The $timestamp$ is the reserved word in DBConnect, you have to use it this way. the &lt;EVENTDATE&gt; is your field name, that can be any text you like.&lt;/EVENTDATE&gt;&lt;/P&gt;

&lt;P&gt;I am not saying this is a good design, but it is the way it is right now.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2013 19:32:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133294#M184654</guid>
      <dc:creator>btsay_splunk</dc:creator>
      <dc:date>2013-11-13T19:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: DBX not outputing SQL DateTime Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133295#M184655</link>
      <description>&lt;P&gt;In dbmon, DBConnect allows a "template" output format for outputting event data. If you want to output the timestamp field with timestamp format, the syntax is $timestamp$, DBConnect already knows your timestamp column name, so it uses $timestamp$ for such purpose. Do not use your field name such as $EventDate$ here. The correct template should be:&lt;/P&gt;

&lt;P&gt;[text] $timestamp$ [other text]&lt;/P&gt;

&lt;P&gt;It will replace/display the timestamp field value properly.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2013 19:50:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/DBX-not-outputing-SQL-DateTime-Timestamp/m-p/133295#M184655</guid>
      <dc:creator>btsay_splunk</dc:creator>
      <dc:date>2013-11-13T19:50:01Z</dc:date>
    </item>
  </channel>
</rss>

