I've an issue defining a query to get some data out of Cassandra in WSO2 DSS. The query (and the operation) itself is working but my problem is when I try to get a timestamp as a result. I only get the date and the timezone (2017-01-11+0100) the time part is missing. I guess that this is somehow related on the mapping to dateTime xsdType that is not working correctly. Did you already face this issue, and do you have a solution to get the timestamp?
Here is a query sample
<query id="getDataQuery" useConfig="CassandraDB">
<expression>SELECT ts,value FROM keyspace.ts_tp WHERE name = :name</expression>
<result element="result" rowName="data">
<element column="ts" name="ts" xsdType="dateTime"/>
<element column="value" name="value" xsdType="decimal"/>
</result>
<param name="name" paramType="SCALAR" sqlType="STRING"/>
</query>
Thanks
Seems to be an issue in dss dateTime mapping, I opened a Jira ticket @wso2 to be sure. In order to make my call return the right values I made the following (Warning painful solution :))
The query returns now the unix Timestamp in ms
Once I get the result I apply an XSL transformation to compute the dates
It needs to be tested with different time zones, and day light savings but it seems to be a working hack, waiting for the official fix.