Multidimensional modeling (4): Multidimensional Modeling
Enable SqlServer and AnalysisService
Open Visual Studio and createAnalysisServiceMulti-dimensional data mining projectAnd solutions.
Create a data source: AdventureWorksDW2008R2
Create a data source view:DimCustomer, DimDate, DimGeography, DimProduct, FactInternetSales
Right-click a table or column in the diagram.AttributeYou can change the corresponding name.
InSalesSelected in the tableSalesTerritoryKey, Hold down the mouse and dragRegionTableSalesTerritoryKey, That is, the createdSales tableAndRegion table.
Create dimension: Right-clickDimension,Create dimension...
SelectCreate a dimension using an existing table, Select nextMaster table, Key column: DateKey, FullDateAlternateKey, EnglishMonthName, CalendarQurter, CalendarYear, CalendarSemester
Create cube: Right-clickMulti-dimensional dataset,Create a multi-dimensional dataset...
Use existing table, Select the data source viewAdventureWorks DW2008R2, ClickSuggestions, SelectSalesTable.
InSales metric Value, Remove four columns:PromotionKey,CurrencyKey,SalesTerritory Key,RevisionNumber(Promotion keyword, currency keyword, sales region keyword, revision number)
By default, the wizard Selects all numeric columns not linked to the dimension in the fact data table as the measurement value. However, these four columns are not actual measurements. The first three columns are the key values that link a fact data table to a dimension table not used in the initial version of this cube.
Next,Select existing dimension, SelectDate dimension
Next,Select New Dimension, SelectProducts, customers, RegionsThree dimensions,SalesDeselect the check box.
Next, complete!
You can seeMetric ValueAndDimension. If no dimension exists, you can right-click to add a dimension. After each step is completed, you need to save it all.
Add attributes to a dimension: ImageCustomer and regionAndProduct DimensionAdd attributes.
Double-clickCustomer. Dim. In the attribute pane, CustomerKey and GeographyKey ("customer keyword" and "region keyword") attributes exist.
NowCustomerDrag the following columns of the table to the properties pane.
BirthDate, MaritalStatus, Gender, EmailAddress, YearlyIncome, TotalChildren, NumberChildrenAtHome, EnglishEducation, education, HouseOwnerFlag, NumberCarsOwned, Phone, DateFirstPurchase, CommuteDistance
Double-clickRegionAdd the fields in the region table to the region dimension attributes: City, StateProvinceName, EnglishCountryRegionName, and PostalCode.
Double-clickProduct DimensionTo add the fields in the product table to the Product Dimension attributes: standardCost, Color, SafetyStockLevel, ReorderPoint, ListPrice, Size, SizeRange, Weight, DaysToManufacture, ProductLine, DealerPrice, Class, Style, ModelName, StartDate, EndDate, Status
Double-clickDate dimensionTo add fields in the date table to the date dimension attributes: DateKey, FullDateAlternateKey, EnglishMonthName, CalendarQurter, CalendarYear, and CalendarSemester.
Now let's look at the multi-dimensional dataset:AdventureWorks DW2008R2. cube, The attribute in the dimension has been added !~
Deployment Project: Right-clickMulti-dimensional dataset Project, ClickAttributeOpenProperty page.
Set the output information and the deployed Server database information.
Deployment Project: Right-clickMulti-dimensional dataset Project, ClickDeployment.
Deployment completed!
Reference: multi-dimensional modeling (Adventure Works tutorial)