You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Chandni <ch...@gmail.com> on 2019/03/07 03:54:02 UTC

SQL XML configuration for timestamp problematic when using sybase as third party persistence

Hi

I am using Sybase as third party persistence and using XML to configure
cache store factory.

Sybase datetime displays date by default format :
yyyy/mm/dd HH:mm:ss Am/pm 

Whereas Ignite is expecting a different format with nanoseconds.

This is causing BinaryMarshaller to fail in deserialising the object for
tables that have a datetime field.

Can someone please suggest how can we use custom date format with third
party persistence.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: SQL XML configuration for timestamp problematic when using sybase as third party persistence

Posted by Alexey Kuznetsov <ak...@apache.org>.
Hi,

You may try to implement your Sybase  JdbcTypesTransformer.
That will correctly extract Sybase datetime and convert it to Timestamp.

You can take JdbcTypesDefaultTransformer, extend it.
And configure cache store with your transformer (see
o.a.i.cache.store.jdbc.CacheJdbcPojoStoreFactory#setTransformer)

-- 
Alexey Kuznetsov

Re: SQL XML configuration for timestamp problematic when using sybase as third party persistence

Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!

I guess you will have to extend CacheJdbcPojoStore and do conversion of
types there.
I have found the following link:
http://www.sqlines.com/sybase-to-mariadb/convert_string_to_datetime

Regards,
-- 
Ilya Kasnacheev


чт, 7 мар. 2019 г. в 06:57, Chandni <ch...@gmail.com>:

> To add the java type configuration I am currently using is
> java.sql.TYPES.TIMESTAMP
> And java.sql.Timestamp
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>

Re: SQL XML configuration for timestamp problematic when using sybase as third party persistence

Posted by Chandni <ch...@gmail.com>.
To add the java type configuration I am currently using is
java.sql.TYPES.TIMESTAMP 
And java.sql.Timestamp



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/