Splunk Cloud Platform

Splunk DB connect raising column on Oracle Timezone field

sureshkrovi
Explorer

I'm trying to index oracle table by setting up raising column on time stamp with timezone that was set to data type TIMESTAMP(6) WITH TIME ZONE(e.g value 08-SEP-17 08.01.39.330434000 AM UTC) in oracle database.

Getting error when time stamp is set to DD-Mon-YY HH:MI:SS TZH:TZM for create_time raising column

java.lang.ClassCastException: java.lang.String cannot be cast to oracle.sql.TIMESTAMPTZ

Any help would be appreciated.

Tags (1)
0 Karma

pruthvikrishnap
Contributor

I think this issue is related to JDBC drivers, here are few links which explains DATE and TIMESTAMP is JDBC Driver specific.
https://community.oracle.com/thread/68918?start=0&tstart=0

http://www.coderanch.com/t/90891/JBoss/oracle-jdbc-Compatible-true

https://community.oracle.com/message/3613155

0 Karma

sureshkrovi
Explorer

Is there a way to customize oracle drivers in splunk.I did configure default ones available with splunk enterprize 7.2.0.Wondering what I can do to fix this in my local installation.Most of the above posts referring java jdbc code ,not sure how to interpret that in splunk.

Please note that the static query with hardcoded time stamp is working good.some how splunk raising column setup passes the data type as java.lang.String that has issues while comparing against java.oracle.TimeStamp.

Working Version:

SELECT <> FROM <> where create_ts > to_timestamp('01-11-2018 08:15:03', 'DD-MM-YYYY HH24:MI:SS') order by create_ts ASC

Issue When replaced string date with ? by configuring it to timestamp raising column
SELECT <> FROM <> where create_ts > to_timestamp(?, 'DD-MM-YYYY HH24:MI:SS') order by create_ts ASC

0 Karma
Get Updates on the Splunk Community!

Prove Your Splunk Prowess at .conf25—No Prereqs Required!

Your Next Big Security Credential: No Prerequisites Needed We know you’ve got the skills, and now, earning the ...

Splunk Observability Cloud's AI Assistant in Action Series: Observability as Code

This is the sixth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how to ...

Splunk Answers Content Calendar, July Edition I

Hello Community! Welcome to another month of Community Content Calendar series! For the month of July, we will ...