US and Worldwide: +1 (866) 660-7555
Results 1 to 5 of 5

Thread: Time dimension column type Date in oracle

  1. #1
    Join Date
    May 2013
    Posts
    9

    Default Time dimension column type Date in oracle

    hey, All,
    At first , My db is Orcale.
    A column type is String and its format (YYYYMM) in time dimension and fact table.
    it's work.

    But A column type is Date(ex: 2008/1/1) in time dimension and fact table.
    it error exception
    java.lang.ClassCastException: java.sql.Timestamp cannot be cast to java.lang.String

    What step I need to do to solve this error.

  2. #2
    Join Date
    Jan 2013
    Posts
    531

    Default

    What does your <Level> definition look like? Sounds like you might have left off the type="Timestamp".

  3. #3
    Join Date
    May 2013
    Posts
    9

    Default

    Thanks mcampbell your reply.

    My fact table's column - start_date its type is Date and format is yyyy/mm/dd,
    and the time dimension's column - FULL_DATE its type is Date and format is yyyy/mm/dd.

    In my schema file,
    the time dimension like this
    <Hierarchy name="FULL_DATE" visible="true" hasAll="true">
    <Table name="SBI_DIM_DATE" schema="CC">
    </Table>
    <Level name="Full Date" visible="true" column="FULL_DATE" nameColumn="FULL_DATE" type="Date" uniqueMembers="false" levelType="TimeDays" hideMemberIf="Never">
    </Level>
    </Hierarchy>
    But its still throws exception
    java.lang.ClassCastException: java.sql.Timestamp cannot be cast to java.lang.String

    java.lang.ClassCastException: java.sql.Timestamp cannot be cast to java.lang.String at mondrian.rolap.RolapMember.getName(RolapMember.java:495)
    What's wrong with my file setting?

  4. #4
    Join Date
    Jan 2013
    Posts
    531

    Default

    Try changing type to "Timestamp" (you currently have it set to "Date").

  5. #5
    Join Date
    May 2013
    Posts
    9

    Default

    hey, all,

    The exception still not solve.
    java.lang.ClassCastException: java.sql.Timestamp cannot be cast to java.lang.String
    But I take the SQL to Workbench for MDX Query.
    select {[Measures].[Total ProductQty]} ON COLUMNS, Hierarchize(Union({[START_DATE.FULL_DATE].[All START_DATE.FULL_DATEs]}, [START_DATE.FULL_DATE].[All START_DATE.FULL_DATEs].Children)) ON ROWS
    from [Product Data]
    The SQL work on Workbench MDX Query,but not work on the olap.

    what's else I should to try?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •