1、数据转换任务数据转换任务1事实表源:SELECT Orders.EmployeeID, Orders.CustomerID, Orders.OrderID, Order Details.ProductID,Products.SupplierID, Orders.OrderDate, OrderDetails.Quantity, Order Details.UnitPrice,Order Details.DiscountFROM Customers INNER JOINOrders ON Customers.CustomerID = Orders.CustomerIDINNER JOINOrde
2、r Details ON Orders.OrderID = Order Details.OrderIDINNER JOINEmployees ON Orders.EmployeeID = Employees.EmployeeIDINNER JOINProducts ON Order Details.ProductID = Products.ProductIDINNER JOINSuppliers ON Products.SupplierID = Suppliers.SupplierID目的:增加Total 字段money 类型转换:DTSDestination(Total)=DTSSource
3、(UnitPrice)*DTSSource(Quantity)*(1.0-DTSSource(Discount)2员工表源:SELECT EmployeeID, LastName, FirstName, Title, ReportsTo FROM Employees目的:删除:LastName 和 FirstName 字段增加Name char(30) 字段转换:DTSDestination(Name) = DTSSource(FirstName) & & DTSSource(LastName)3顾客表源 : SELECT CustomerID, CompanyName, ContactNam
4、e, City, Region, Country FROMCustomers目的:CompanyName 改为CustomerName转换:无4产品表源:SELECT ProductID, ProductName, CategoryID, QuantityPerUnit FROM Products目的:无变化转换:无5 产品类别源:SELECT CategoryID, CategoryName FROM Categories目的:无变化转换:无6供应商源:SELECT SupplierID, CompanyName FROM Suppliers目的:无变化转换:无7时间表源:SELECT Di
5、stinct OrderDate FROM Orders目的:无变化转换:无数据仓库创建任务:1连接数据源2创建共享维度(采用维度向导)(1)员工维度(星型架构)维度级别:员工姓名(2)顾客维度(星型架构)维度级别:国家,地区,城市,顾客姓名(3)供应商维度(星型架构)维度级别:供应商姓名(4)产品维度(雪花架构)类别表,产品表维度级别:类别名称,产品名称(5)时间维度(星型架构)类型:时间维度维度级别:年,季度,月3创建多维数据集(采用向导)事实表:Sales度量值:Quantity, Total,UnitPrice维度:全选4设计存储并开始处理客户端表现工具:1SQL Server 自带工具2Excel 的数据透视表和数据透视视图(1)选择外部数据源(2)新建 OLAP 多维数据集