[Mondrian] DATE datatype support

Jonathan Rand rand.jc at gmail.com
Wed Oct 14 16:56:49 EDT 2009


I think my recent post about Oracle's mapDateToTimestamp setting should have
included a bit of Mondrian-specific information.  The Oracle setting can be
embedded in a Mondrian connect string as
"jdbc.oracle.jdbc.mapDateToTimestamp=false".

>From Mondrian (
http://mondrian.pentaho.org/documentation/configuration.php#Connect_string_properties):
Any property whose name begins with "jdbc." will be added to the JDBC
connection properties, after removing this prefix.

Jon Rand

On Tue, Oct 13, 2009 at 5:41 PM, Jonathan Rand <rand.jc at gmail.com> wrote:

> Oracle has provided a connection property that will cause getObject() to
> return a java.sql.Date object for Date columns.  The property name is
> "oracle.jdbc.mapDateToTimestamp".  Setting the property to "false" restores
> the behavior that Mondrian expects.
>
> Jon Rand
>
> On Thu, Oct 1, 2009 at 2:11 PM, Matt Campbell <mkambol at gmail.com> wrote:
>
>> The 1.4 Oracle drivers treat DATE fields as a java.sql.Date (makes
>> sense).  WIth the 5 and 6 versions they have started treating both date and
>> timestamp as java.sql.Timestamp.  This can cause an error with Mondrian if
>> any levels are defined as having type='Date', since the JdbcDialect will
>> assume that date literals match the yyyy-mm-dd format and will throw an
>> exception if the string includes the time (e.g. '2001-01-19 00:00:00.0').
>> I've entered *MONDRIAN-626 <http://jira.pentaho.com/browse/MONDRIAN-626>*for this issue.
>>
>> I'm not sure if any other jdbc drivers besides Oracle have a similar quirk
>> about treating Date and Timestamp both as java.sql.Timestamp.
>>
>> One possible solution would be to update the dialect to drop the time
>> information if the datatype is DATE.  Another option would be to strip the
>> timestamp when the member is loaded.  The second option has the advantage of
>> dropping the unwanted time information from the member name.  Thoughts?
>>
>> _______________________________________________
>> Mondrian mailing list
>> Mondrian at pentaho.org
>> http://lists.pentaho.org/mailman/listinfo/mondrian
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20091014/dc8d402b/attachment.html 


More information about the Mondrian mailing list