Building sales fact
Is there any clear explanation how to build sales fact using ssis ? There are some concepts that have significant difference with each other. I use snowflake schema to build my next sales fact. This sales fact will be the origin to build the the cube using ssas. Some detailed explanation : 1. Do i have to group sales fact using all dimension? 2. Do i have to drop the primary key in sales fact table? Any replies will be very appreciated. Thanks
December 13th, 2010 2:27am

my source table is customer, product, product group, sub product group, supplier, sales table. This sales table contains one measure like detail of each sales. product, product group and sub product group is the reason why i use snow flake schema. customer, product, supplier and date become dimensions and sales table become measure table. CMIIW Thanks
Free Windows Admin Tool Kit Click here and download it now
December 13th, 2010 2:44am

The AdventureWorksDW refresh SSIS package is available with the samples download. It is a good example for you to study. AWDW refresh video: http://www.youtube.com/watch?v=QsjcUYkno7A Generally: 1. Populate dimension tables 2. Populate fact tables For a detail fact table you don't have to do grouping, that is done by the OLAP cube or DW queries using the data. For fast population, you don't have to have Primary Key or indexes, you can apply them after population. Following is an example of a sales fact table: SELECT TOP 3 [ProductKey] ,[OrderDateKey] ,[DueDateKey] ,[ShipDateKey] ,[CustomerKey] ,[PromotionKey] ,[CurrencyKey] ,[SalesTerritoryKey] ,[SalesOrderNumber] ,[SalesOrderLineNumber] ,[RevisionNumber] ,[OrderQuantity] ,[UnitPrice] ,[ExtendedAmount] ,[UnitPriceDiscountPct] ,[DiscountAmount] ,[ProductStandardCost] ,[TotalProductCost] ,[SalesAmount] ,[TaxAmt] ,[Freight] ,[CarrierTrackingNumber] ,[CustomerPONumber] FROM [AdventureWorksDW2008].[dbo].[FactInternetSales] /* ProductKey OrderDateKey DueDateKey ShipDateKey CustomerKey PromotionKey CurrencyKey SalesTerritoryKey SalesOrderNumber SalesOrderLineNumber RevisionNumber OrderQuantity UnitPrice ExtendedAmount UnitPriceDiscountPct DiscountAmount ProductStandardCost TotalProductCost SalesAmount TaxAmt Freight CarrierTrackingNumber CustomerPONumber 310 20010701 20010713 20010708 21768 1 19 6 SO43697 1 1 1 3578.27 3578.27 0 0 2171.2942 2171.2942 3578.27 286.2616 89.4568 NULL NULL 346 20010701 20010713 20010708 28389 1 39 7 SO43698 1 1 1 3399.99 3399.99 0 0 1912.1544 1912.1544 3399.99 271.9992 84.9998 NULL NULL 346 20010701 20010713 20010708 25863 1 100 1 SO43699 1 1 1 3399.99 3399.99 0 0 1912.1544 1912.1544 3399.99 271.9992 84.9998 NULL NULL */ Kalman Toth, SQL Server & Business Intelligence Training; SQL Server 2008 Training
December 13th, 2010 4:07am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics