[Mondrian] Creating a time dimension based on foreign key toDateTime field

m h sesquile at gmail.com
Tue Sep 23 15:33:23 EDT 2008


On Tue, Sep 23, 2008 at 12:25 PM, Julian Hyde <jhyde at pentaho.com> wrote:
> I'm guessing that dateid is an integer that doesn't have any structure to it
> - i.e. can only be decoded by joining to the date_dim table.
>

Yes, that is true

snip, snip
> Some people try to make their time dimension run off a datetime value
> directly, and using datetime functions to extract the year etc. on the fly.
> This is assuming that your database is really really smart - which it isn't.
> So don't do it.

Thanks for the warning.  I'll use a table like you suggested, with all
values broken out.

>
> Julian
>
>> -----Original Message-----
>> From: mondrian-bounces at pentaho.org
>> [mailto:mondrian-bounces at pentaho.org] On Behalf Of m h
>> Sent: Tuesday, September 23, 2008 11:10 AM
>> To: mondrian at pentaho.org
>> Subject: [Mondrian] Creating a time dimension based on
>> foreign key toDateTime field
>>
>> Hi Folks-
>>
>> New to the list here.  Just started playing out with Mondrian.  Wrote
>> up a basic schema yesterday and got the schema workbench connected to
>> my db this morning (need to add jdbc jar to classpath in startup
>> script).
>>
>> My brief searching of the docs and searching the forums hasn't turned
>> up an answer for my question, which is:
>>
>> I have a dateid field in my fact table.  It's a foreign key to a
>> date_dim table which has a DateTime field in it ("timestamp" in
>> Postgres).  How do I generate my "Time" dimension schema here?
>>
>> I'm all ears...
>>
>> thanks much!
>>
>> -matt
>>
>> _______________________________________________
>> Mondrian mailing list
>> Mondrian at pentaho.org
>> http://lists.pentaho.org/mailman/listinfo/mondrian
>>
>>
>>
>
>
> _______________________________________________
> Mondrian mailing list
> Mondrian at pentaho.org
> http://lists.pentaho.org/mailman/listinfo/mondrian
>




More information about the Mondrian mailing list