Re: Customize the joins between my Fact table and Dimensions?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hey Dan,

I only know 2005, but I have created a cube off an OLTP DB which
it sounds like what you are trying to accomplish.
This may help, I cast the degenerate dimension, the time field in your
table as it's own dimension using a view. Like so:

CREATE view [dim].[Date]
with schemabinding
as
select
convert(datetime, ca.AttemptDt,101) as [ Attempt Date]
,day(ca.AttemptDt) as [Day of Month]
,datename(m,ca.AttemptDt) as [Month Name]
,month(ca.AttemptDt) as [Month Number]
,datename(quarter,ca.AttemptDt) as [Quarter]
,year(ca.AttemptDt) as [Year]
from
dbo.tbl ca with (nolock)

then the fact

CREATE view [fact].[table]
with schemabinding
as
select

,convert(datetime, ca.AttemptDt,101) as [Attempt Date]


from
dbo.table t with (nolock)


Then you can include the key in both views and join on that. Or you
can join the two time stamps togther.

Hope this helps



On Nov 7, 1:51 pm, Dan <dan_willi...@xxxxxxxxxxxxxxxxxxxx> wrote:
OK, i'm relatively new to this OLAP/data warehousing business, so
please excuse my ignorance.

I'm using Microsoft Analysis Service 2000.

I have a fact table that has a datetime column that goes down to the
hour and minute.
I have created a shared time dimension that goes down to the day
level.

In my Cube Editor, I want to join my fact table to my shared time
dimension via the fact tables datetime column.

Is there anyway i can adjust the "INNER JOIN" my doing something like
this SQL:-

SELECT * FROM factTable INNER JOIN Time ON CAST(factTable.datetime,
smalldatetime) = Time.SmallDateTime

At present my cube returns no values, as my fact table contains dd/mm/
yyyy hh:mm's where as my shared time dimension only contains dd/mm/
yyyy's.

I don't want to have to create hours and minutes in my time dimension
table as there would be millions of rows.

Also, i don't really want to have to perform a DTS package on all my
fact tables to do this initial convertion, as i'd have to do this for
all my other future cubes, of which there could be many.

I've seen a lot of mention in examples and books, that shows a Primary
Key in the Time dimension table, which links to a foreign key in the
fact table. How are people populating the foreign keys? Is this
something that is done to populate a separate datawarehouse source?
I'm currently using my live OLTP database as the source. Should i be
doing this?

I could create a new SQL view to convert the dates without the hours
and minutes? Anyone know the performance issues with this?

Ideally, i'd like to be able to customize the link between fact table
and my dimensions?
Is this possible?

Thanks in advance for any suggestions.

Dan


.



Relevant Pages

  • Re: Customize the joins between my Fact table and Dimensions?
    ... This may help, I cast the degenerate dimension, the time field in your ... I have created a shared time dimension that goes down to the day ... Key in the Time dimension table, which links to a foreign key in the ... I'm currently using my live OLTP database as the source. ...
    (microsoft.public.sqlserver.olap)
  • Customize the joins between my Fact table and Dimensions?
    ... I have created a shared time dimension that goes down to the day ... SELECT * FROM factTable INNER JOIN Time ON CAST(factTable.datetime, ... At present my cube returns no values, as my fact table contains dd/mm/ ... Key in the Time dimension table, which links to a foreign key in the ...
    (microsoft.public.sqlserver.olap)
  • Re: Attribute relatioships not working?
    ... Microsoft SQL Server 2005 - ... My time dimension has both the fiscal and calendar ... browse the cube via the calendar hierarchy everything is OK. ... the meta data pane is not refreshed. ...
    (microsoft.public.sqlserver.olap)
  • Time dimension - YTD Error when used in cube
    ... When it's used as a dimension in a cube, ... Unable to display cell properties ... When the calculated member was created, the syntax was fine and no error ... for the column that the Time dimension 'links' to. ...
    (microsoft.public.sqlserver.olap)
  • Re: Last month in Time dimension (named sets?)
    ... Most solutions I see here are talking about using a measure in the MDX ... Added LastMonth bit filed to time dimension table ... cube build in DTS ... > periodicity dimension dn named sets as I see it. ...
    (microsoft.public.sqlserver.olap)