Hi<br>Thanks,but I don't get it exactly<br>Do we seperate the Hour to another dimension or just add it under the level of Day?<br><br>Re<br><br><br><div class="gmail_quote">On Wed, Jul 22, 2009 at 9:49 AM, Mathias Bogaert <span dir="ltr"><<a href="mailto:m.bogaert@memenco.com">m.bogaert@memenco.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">FYI here are my Dimension definitions:<br>
<br>
<Dimension name="Time" type="TimeDimension"><br>
<Hierarchy hasAll="true" allMemberName="All Periods" primaryKey="id"><br>
<Table name="time_dimension"/><br>
<Level name="Year" column="the_year" type="Numeric"<br>
uniqueMembers="true" levelType="TimeYears"/><br>
<Level name="Month" column="month_of_year" type="Numeric"<br>
uniqueMembers="false" levelType="TimeMonths"/><br>
<Level name="Day" column="day_of_month" type="Numeric"<br>
uniqueMembers="false" levelType="TimeDays"/><br>
</Hierarchy><br>
<!-- [Time.Quarterly].[2008].[Q3] --><br>
<Hierarchy name="Quarterly" hasAll="true" allMemberName="All<br>
Quarters" primaryKey="id"><br>
<Table name="time_dimension"/><br>
<Level name="Year" column="the_year" type="Numeric"<br>
uniqueMembers="true" levelType="TimeYears"/><br>
<Level name="Quarter" column="quarter"<br>
uniqueMembers="false" levelType="TimeQuarters"/><br>
<Level name="Month" column="month_of_year" type="Numeric"<br>
uniqueMembers="false" levelType="TimeMonths"/><br>
<Level name="Day" column="day_of_month" type="Numeric"<br>
uniqueMembers="false" levelType="TimeDays"/><br>
</Hierarchy><br>
<!-- [Time.Weekly].[2008].[44] --><br>
<Hierarchy name="Weekly" hasAll="true" allMemberName="All<br>
Weeks" primaryKey="id"><br>
<Table name="time_dimension"/><br>
<Level name="Year" column="the_year" type="Numeric"<br>
uniqueMembers="true" levelType="TimeYears"/><br>
<Level name="Week" column="week_of_year" type="Numeric"<br>
uniqueMembers="false" levelType="TimeWeeks"/><br>
<Level name="Day" column="day_of_week" type="Numeric"<br>
uniqueMembers="false" levelType="TimeDays"/><br>
</Hierarchy><br>
</Dimension><br>
<br>
<Dimension name="TimeHour"><br>
<Hierarchy hasAll="true" allMemberName="All Hours" primaryKey="id"><br>
<Table name="time_hour_dimension"/><br>
<Level name="Year" column="the_year" type="Numeric"<br>
uniqueMembers="true" /><br>
<Level name="Month" column="month_of_year" type="Numeric"<br>
uniqueMembers="false" /><br>
<Level name="Day" column="day_of_month" type="Numeric"<br>
uniqueMembers="false" /><br>
<Level name="Hour" column="hour_of_day" type="Numeric"<br>
uniqueMembers="false" /><br>
</Hierarchy><br>
</Dimension><br>
<br>
Then, in the cube define them like this:<br>
<br>
<DimensionUsage source="Time" name="Time"<br>
foreignKey="fk_time_dimension"/><br>
<DimensionUsage source="TimeHour" name="TimeHour"<br>
foreignKey="fk_time_hour_dimension"/><br>
<br>
Enjoy!<br>
<font color="#888888"><br>
Mathias<br>
</font><div><div></div><div class="h5"><br>
On Tue, Jul 21, 2009 at 11:56 PM, Julian Hyde<<a href="mailto:jhyde@pentaho.com">jhyde@pentaho.com</a>> wrote:<br>
> By the way, I added level types Hours, Minutes, Seconds (also HalfTear and<br>
> Unspecified) in change 12749; I also added to the olap4j API. Will be in the<br>
> next mondrian release.<br>
><br>
> But I agree with the wizards on this thread: level types don't give you<br>
> much, and are no substitute for good schema design.<br>
><br>
> Julian<br>
><br>
> ________________________________<br>
> From: <a href="mailto:mondrian-bounces@pentaho.org">mondrian-bounces@pentaho.org</a> [mailto:<a href="mailto:mondrian-bounces@pentaho.org">mondrian-bounces@pentaho.org</a>] On<br>
> Behalf Of Nicholas Goodman<br>
> Sent: Tuesday, July 21, 2009 9:53 AM<br>
> To: Mondrian developer mailing list<br>
> Subject: Re: [Mondrian] Add hour level to Time dimension<br>
><br>
> +1. I've always split out time of day as well.<br>
><br>
> Really the only reason to use the special Mondrian time dimension<br>
> configuration is to be able to do "YTD()" and other special time MDX<br>
> functions. I don't think there's any HTD() (hour to date) or other<br>
> shortcuts that would benefit you.<br>
><br>
> Is there some reason, other than your performance requirement, that you'd<br>
> like it part of the same time dimension?<br>
><br>
><br>
> On Tue, Jul 21, 2009 at 5:52 AM, Pedro Alves <<a href="mailto:pmgalves@gmail.com">pmgalves@gmail.com</a>> wrote:<br>
>><br>
>><br>
>>> Considering the performance , my solution is to separate the time<br>
>>> dimension(which i think is not good, cause I cant drill down through<br>
><br>
><br>
</div></div><div><div></div><div class="h5">> _______________________________________________<br>
> Mondrian mailing list<br>
> <a href="mailto:Mondrian@pentaho.org">Mondrian@pentaho.org</a><br>
> <a href="http://lists.pentaho.org/mailman/listinfo/mondrian" target="_blank">http://lists.pentaho.org/mailman/listinfo/mondrian</a><br>
><br>
><br>
<br>
_______________________________________________<br>
Mondrian mailing list<br>
<a href="mailto:Mondrian@pentaho.org">Mondrian@pentaho.org</a><br>
<a href="http://lists.pentaho.org/mailman/listinfo/mondrian" target="_blank">http://lists.pentaho.org/mailman/listinfo/mondrian</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>-------------------------<br>Lin Chun<br><a href="http://www.brainyquote.com/quotes/authors/t/ted_turner.html" target="_blank">Ted Turner</a> - "Sports is like a war without the killing."