Cassandara date/timestamp field

I want to see raw value from database in editor, without any converting into my local TZ or else, because this is key field and I need exact timestamp like

2018-08-27 07:09:32.953+0000

How can I configure DataGrip to work this way?

3 comments

Hi, Y,

Yes, there is a problem with displaying milliseconds of timestamps because current version of Cassandra jdbc driver returns incorrect scale for such columns.

If it bothers you a lot you may now download new version of driver and attach it as custom driver. The problem will be fixed soon in DataGrip predefined driver (the one that you currently use) so if you install new version manually don't forget to go back to predefined driver when it's updated (~ in a week).

Unfortunately, milli(nano)seconds of `time` values are not displayed in DataGrip even with new driver, it will be fixed for all databases including Cassandra.

About timezones: Cassandra stores timestamp as a number of milliseconds since epoch, driver retrieves this number and wraps it in an instance of java.sql.Time object so in fact Cassandra does not store timezone. You may change the way how cqlsh sets timezones in timestamps but it's not clear how DataGrip should know what timezone you want to use for query results.

 

1

v1.2.8 shows milliseconds... so now waiting for timezone appearance in datetime field =)

0

Please sign in to leave a comment.