Friday, February 24, 2012
Calendar dimension with multiple Fiscal calendars
dimensional tables in a star schema.
For my Calendar dimension, I want to include Fiscal periods, but the data
warehouse has data for different clients that have different fiscal calendars.
How do I handle that ?
If I understand well, you have:
Customer A - 15/10/2006 - CY 2006 FY 2007
Customer A - 30/09/2006 - CY 2006 FY 2006
Customer B - 15/10/2006 - CY 2006 FY 2006
Customer B - 15/10/2006 - CY 2006 FY 2006
You want to see FY 2006 data where FY is the one specific for each
customer.
If this is the case, I think the right model is to have one Fiscal
Calendar dimension (with FY Year, FY MonthNumber, FY QuarterNumber)
that is linked to the fact table.
Of course this model doesn't support you if you want to change the FY
of a Customer without changing the data already loaded into the fact
table.
Marco Russo
http://www.sqlbi.eu
http://www.sqljunkies.com/weblog/sqlbi
Craig HB wrote:
> I am building a data warehouse using the dimensional model -- i.e. fact and
> dimensional tables in a star schema.
> For my Calendar dimension, I want to include Fiscal periods, but the data
> warehouse has data for different clients that have different fiscal calendars.
> How do I handle that ?
Calendar dimension with multiple Fiscal calendars
dimensional tables in a star schema.
For my Calendar dimension, I want to include Fiscal periods, but the data
warehouse has data for different clients that have different fiscal calendar
s.
How do I handle that ?If I understand well, you have:
Customer A - 15/10/2006 - CY 2006 FY 2007
Customer A - 30/09/2006 - CY 2006 FY 2006
Customer B - 15/10/2006 - CY 2006 FY 2006
Customer B - 15/10/2006 - CY 2006 FY 2006
You want to see FY 2006 data where FY is the one specific for each
customer.
If this is the case, I think the right model is to have one Fiscal
Calendar dimension (with FY Year, FY MonthNumber, FY QuarterNumber)
that is linked to the fact table.
Of course this model doesn't support you if you want to change the FY
of a Customer without changing the data already loaded into the fact
table.
Marco Russo
http://www.sqlbi.eu
http://www.sqljunkies.com/weblog/sqlbi
Craig HB wrote:
> I am building a data warehouse using the dimensional model -- i.e. fact an
d
> dimensional tables in a star schema.
> For my Calendar dimension, I want to include Fiscal periods, but the data
> warehouse has data for different clients that have different fiscal calend
ars.
> How do I handle that ?
Tuesday, February 14, 2012
Calculating RFM
I'm in the process of developing a Kimball-method CRM data warehouse and I'd like to have Recency, Frequency, Monetary "scores" at the customer level. Am I better off creating these in the relational database and feeding them to SSAS or have SSAS do the aggregations and assign the "scores"?
Also, has anyone located any SSIS transform scripts that would calculated RFM scores? This is probably a pretty easy task in VB.net but I haven't gone down that road yet.
Steve
Not strictly a Data Mining question, but here goes ...
How often do you want to calculate a score. Typically the Frequency and Monetary scores are only calculated monthly, quarterly or annually rather than being continuously updated. In this case, you would not really want to implement them as OLAP calculations, as the conditional logic in the calculation may get complicated.
You may well be better calculating these in a scheduled job in your ETL process, inserting them as facts, and having the OLAP cube roll them up as appropriate. I don't have SSIS scripts to calculate RFM, but as you say, a reasonably easy task.
BTW, here are some interesting articles on RFM that you may find useful too ...
A 3-part detailed guide ...
http://www.clickz.com/showPage.html?page=961901
http://www.clickz.com/showPage.html?page=971591
http://www.clickz.com/showPage.html?page=983891
A short piece on the theory ...
http://www.dbmarketing.com/articles/Art245.htm
Calculating number of Bytes
We are trying to get a rough estimate of the size of the warehouse in terms of number of bytes. Now I understand that when I say char(2) datatype requires 2 bytes of memory. If this is correct then how many bytes does the following data type need -
1. smalldatetime
2. decimal(14,2)
3. decimal(12,2)
4. int
5. smallint.
6. decimal(9,0)
Also can you explain the byte allocation for a varchar column. Say varchar(20) for example.
Any help is appreciated.
VivekAll of the gory details are explained in Inside SQL Server 2000 (http://search.barnesandnoble.com/booksearch/isbnInquiry.asp?userid=bsq1M1M1GT&isbn=0735609985&itm=1) by Kalen Delaney. Once you read her chapter on table structures, you'll be able to compute exactly how much space your data will need. After you read the chapter on indexing, you'll understand exactly how much space your indicies will need. At that point, you'll also understand more than about 80% of the SQL Server users wandering the planet!
Just as a disclaimer: Kalen is an old friend of mine, but I have no interest of any kind (particularly financial) in selling her book.
-PatP|||Who says indicies?|||Who says indicies?Me do. Why?
-PatP