Uploaded image for project: 'Pentaho Analysis - Mondrian'
  1. Pentaho Analysis - Mondrian
  2. MONDRIAN-355

adding hours/mins as levelType for level of type Dimension

    Details

    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.
    • Closer:
      nobody

      Description

      Could be useful to add levelType for hours and minutes
      to the Dimension of type TimeDimension, and to control a way to aggregate minutes level into a quarter of an hour (15 min) or whatelse minutes aggregation, depending on project requirements.
      Here is an example of what could be a partial schema declaration for the time Dimension :

      <Dimension name="Time" foreignKey="TIME_ID" type="TimeDimension">
      <Hierarchy hasAll="true" allMemberName="All Years" primaryKey="TIME_ID">
      <Table name="TIME"/>
      <Level name="Years" column="YEAR_ID" uniqueMembers="true" levelType="TimeYears"/>
      <Level name="Quarters" column="QTR_NAME" uniqueMembers="false" ordinalColumn="QTR_ID" levelType="TimeQuarters"/>
      <Level name="Months" column="MONTH_NAME" uniqueMembers="false" ordinalColumn="MONTH_ID" levelType="TimeMonths"/>
      <Level name="Days" column="DAY_ID" uniqueMembers="false" levelType="TimeDays"/>
      <Level name="Hours" column="HOUR_ID" uniqueMembers="false" levelType="TimeHours"/>
      <Level name="Mins" column="MIN_ID" uniqueMembers="false" levelType="TimeMins"/>
      </Hierarchy>
      </Dimension>

      Could be usefull to think a way to express an aggregation of minutes in 10/15 minutes.
      Regards

        Activity

        Hide
        jhyde Julian Hyde added a comment -

        The list of level types supported by OLE DB for OLAP (and hence XMLA) is here:

        http://msdn.microsoft.com/en-us/library/ms725431(VS.85).aspx

        [QUOTE]
        LEVEL_TYPE
        DBTYPE_I4
        Required. The following bitmasks are used to specify the level characteristics:
        MDLEVEL_TYPE_REGULAR
        MDLEVEL_TYPE_ALL
        MDLEVEL_TYPE_CALCULATED
        MDLEVEL_TYPE_TIME
        MDLEVEL_TYPE_TIME_YEARS
        MDLEVEL_TYPE_TIME_HALF_YEAR
        MDLEVEL_TYPE_TIME_QUARTERS
        MDLEVEL_TYPE_TIME_MONTHS
        MDLEVEL_TYPE_TIME_WEEKS
        MDLEVEL_TYPE_TIME_DAYS
        MDLEVEL_TYPE_TIME_HOURS
        MDLEVEL_TYPE_TIME_MINUTES
        MDLEVEL_TYPE_TIME_SECONDS
        MDLEVEL_TYPE_TIME_UNDEFINED
        MDLEVEL_TYPE_UNKNOWN

        Note
        The LEVEL_TYPE column exists mainly as a means to transmit formatting instructions to an application. For example, a level with a type of LEVEL_TYPE_TIME_DAYS might indicate to an application that the members of the level should be expressed in text format (that is, "Sunday", "Monday", "Tuesday", and so on). LEVEL_TYPE_REGULAR can be used to signify a level that does not require any special formatting.[/QUOTE]

        It might solve Andrea's problem if we allowed a level of a time dimension to be MDLEVEL_TYPE_TIME_UNDEFINED.

        I don't think we should support semester as a level type. I understand that quarter will do fine instead.

        Show
        jhyde Julian Hyde added a comment - The list of level types supported by OLE DB for OLAP (and hence XMLA) is here: http://msdn.microsoft.com/en-us/library/ms725431(VS.85).aspx [QUOTE] LEVEL_TYPE DBTYPE_I4 Required. The following bitmasks are used to specify the level characteristics: MDLEVEL_TYPE_REGULAR MDLEVEL_TYPE_ALL MDLEVEL_TYPE_CALCULATED MDLEVEL_TYPE_TIME MDLEVEL_TYPE_TIME_YEARS MDLEVEL_TYPE_TIME_HALF_YEAR MDLEVEL_TYPE_TIME_QUARTERS MDLEVEL_TYPE_TIME_MONTHS MDLEVEL_TYPE_TIME_WEEKS MDLEVEL_TYPE_TIME_DAYS MDLEVEL_TYPE_TIME_HOURS MDLEVEL_TYPE_TIME_MINUTES MDLEVEL_TYPE_TIME_SECONDS MDLEVEL_TYPE_TIME_UNDEFINED MDLEVEL_TYPE_UNKNOWN Note The LEVEL_TYPE column exists mainly as a means to transmit formatting instructions to an application. For example, a level with a type of LEVEL_TYPE_TIME_DAYS might indicate to an application that the members of the level should be expressed in text format (that is, "Sunday", "Monday", "Tuesday", and so on). LEVEL_TYPE_REGULAR can be used to signify a level that does not require any special formatting. [/QUOTE] It might solve Andrea's problem if we allowed a level of a time dimension to be MDLEVEL_TYPE_TIME_UNDEFINED. I don't think we should support semester as a level type. I understand that quarter will do fine instead.
        Hide
        aschurman Alexander Schurman added a comment -

        Hello Julian / Team,

        The semester idea actually is the HALF_YEAR level type, which is Q1 + Q2 for Half 1 and Q3 + Q4 for second Half

        Show
        aschurman Alexander Schurman added a comment - Hello Julian / Team, The semester idea actually is the HALF_YEAR level type, which is Q1 + Q2 for Half 1 and Q3 + Q4 for second Half
        Hide
        jhyde Julian Hyde added a comment -

        Fixed in change 12749, will be in 3.1.2. Requires olap4j-0.9.7.241 or later.

        Show
        jhyde Julian Hyde added a comment - Fixed in change 12749, will be in 3.1.2. Requires olap4j-0.9.7.241 or later.
        Hide
        schodnicki Slawomir Chodnicki (Inactive) added a comment -

        Apparently this is done. We should make sure it is for 3.x and any relevant changes to 4.x are carried over, then close this case.

        Show
        schodnicki Slawomir Chodnicki (Inactive) added a comment - Apparently this is done. We should make sure it is for 3.x and any relevant changes to 4.x are carried over, then close this case.
        Hide
        jhyde Julian Hyde added a comment -

        Was fixed in 3.1.2; have verified that code is in 4.0 branch also.

        Show
        jhyde Julian Hyde added a comment - Was fixed in 3.1.2; have verified that code is in 4.0 branch also.

          People

          • Assignee:
            Unassigned
            Reporter:
            andreacolpo Andrea Colpo
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: