I am working with BO designer XI R2.
Initially my fact table consisted of date fields. Now , the fact table is supposed to contain only the Date Key fields and no more date fields. So in order to retrieve the date fields I am to link the corresponding key in the fact table to the key in the date dimension table. The date dimension table will now contain the date field.
My fact table is linked to a dimension table which had a complex join like this.
Fact_Table. ID= Dimension_Table.ID and Fact_table. Date >= Dimension_Table. Start date and Fact_table. Date <= Dimension_Table. End date
Now the Date fields exists no more in the fact table.
The link is something like this now:
Fact_Table. ID=Dimension_Table. ID
and
Fact_table. Date_Key=Date_table.Date_Key
There is no link between the Date_Table and the Dimension table.
Please see the attachment to get an idea of the scenario.
So how do I linkt o produce the same complex join mentioned above?
If you are in a true data warehouse scenario, you shouldn’t need the date field.
Do you have surrogate keys in your dimension table?
If so, and assuming(!) that the ETL has been written properly, then the fact table should be linked to the correct version of the dimension for the time at which the fact took place. That’s the whole point of surrogate keys in a slowly changing dimension scenario.
So star schema means it is a reporting database of sorts, whether that be a data mart, data warehouse, whatever.
In the dimension table, what is the primary key?
Is it ID combined with Start Date?
Are you able to post the create script for the table up here? I’ll understand from company confidentiality if you aren’t. If you can’t, you could email it to me and I’ll post a cut down/anonymised version on here to explain what’s going on.
The second alias of the Date table will be dimension table based on what link? There is no link between the dimension and the date table.
second in case I link and try getting the where clause something like this
Date_Table.Date>= Dimension_table. Start_Date and Date_Table.Date<=Dimension_table. End_Date
The Date_table.Date contains all the date and not the specific Create date that I want.
My condition should be something like this:
Date_Table.CreateDate>= Dimension_table. Start_Date and Date_Table.CreateDate<=Dimension_table. End_Date
How do I get the Create Date?
Again by linking the fact.Key and date.key
So , we come back to the same point where we started. How to go abut this? Is there any modification that there has to be in the table structure that will help achieve this?
Or is there something else that can be done
Where do you derive the Create Date now from then?
Is it from the fact table?
Date_Table.Date>= Dimension_table. Start_Date and Date_Table.Date<=Dimension_table. End_Date
is not going to give you a create date, it’s giving you a range of dates.
You’re not being clear on what you are trying to achieve either that or you’ve not understood what I’ve written.
Fact_table. Create_Date_Key=Date_table.Date_Key , the date_table in turn containing the Date field
If that stands, then your Calendar Date in Date_Table is now your Create Date. This is because you’ve joined the fact table to the date_table on Create Date Key.
My fact table is linked to a dimension table which had a complex join like this.
Fact_Table. ID= Dimension_Table.ID and Fact_table. Date >= Dimension_Table. Start date and Fact_table. Date <= Dimension_Table. End date
Now the Date fields exists no more in the fact table.
The link is something like this now:
Fact_Table. ID=Dimension_Table. ID
and
Fact_table. Date_Key=Date_table.Date_Key
There is no link between the Date_Table and the Dimension table.
Please see the attachment in my first post to get an idea.
So how do I linkt o produce the same complex join mentioned above?
As you said in the previuos post that create an alias table for date and then link it to dimension
something like :
Fact_Table>—Dimension_table------Alias of Date_table work?
The link between the Dimension_table and table is like:
Date_table.Date >= Dim_table.Start date
and Date_table.Date <= Dim_table.End date