The structure of the previous cube has been created.
Next we send the cube's schema definition to an Analysis Services instance, which is deployed to as.
article outline
- Deploy and browse cubes
- SSMs Usage Profile
- Summarize
One, deploy and browse cubes1. Deployment Project
In Solution Explorer, directly right-click the project name and select Deploy.
When you deploy an as project, SSDT first builds the project you have created and checks for preliminary warnings and errors, such as invalid definitions.
If the project definition does not have any errors, SSDT packages all the objects and definitions that you created in the project and sends them to the as instance.
By default, these definitions are sent to the as instance on localhost, creating a database with the same name as the project, and all objects in the project are also created in the database.
At deployment time, SSDT sends not only all the schema definitions of the objects you create, but also sends a command to process the database.
If you are deploying to a different computer, right-click the project and select Properties
You will see a series of status information during deployment. If the deployment succeeds, the following information is displayed in output:
========== Build:1 succeeded or up-to-date, 0 failed, 0 skipped ==========
========== Deploy:1 succeeded, 0 failed, 0 skipped ==========
Next we can browse the cubes that were successfully deployed.
In Cube Designer, open Adventure Works dw2012.cube, and switch to the browser page.
2. Browser page composition
The left part mainly includes the cube and the corresponding cube's measure group and dimension information, as follows:
The right part has two horizontally separated panes.
The upper pane is the Filter pane , and you can specify the filter criteria in the window.
The following is the report pane , which is used to analyze the results.
You can drag and drop measures and dimensions from the metadata pane to the report pane to analyze the data.
3. Analysis Examples
Let's make a simple analysis:
1. Drag and drop the Promotion category attribute of the Dim Promotion dimension and the Sales Territory Group attribute of the Dim Sales Territory Dimension to the report pane
2. Drag and drop the sales amount measure from the fact Internet Sales measure group to the report pane.
You will now see a measure corresponding to the intersection of different values for the Chinese Promotion category and sales Territory group attributes. Each measure that corresponds to the intersection of the dimension attribute values is called a unit.
Let's add a filter to filter out the European.
Switch to statement mode
As you can see, multidimensional Analysis can be very simple and convenient after building a cube (because it has been aggregated beforehand)
ii. Introduction of SSMS usage
Basically the things that SSMs does in SSDT can be done directly, so let's simply explain SSMs.
Open SQL Server, select Analysis Services, you can simply analogy to the database Engine corresponding to the relational databases.
Find our deployed as project, expand to find the structure and SSDT similar, do not do more introduction.
querying using the MDX Query Editor
MDX is a language in which you can query a multidimensional database in a way similar to how SQL uses it when querying a relational database.
MDX can extract information from an Analysis Services cube or dimension. SQL typically returns results along two axes, rows and columns, and MDX returns data along multiple axes.
Typical MDX query syntax
SELECT [<axis_specification>
[, <axis_specification> ...]]
from [<cube_specification>]
[WHERE [Slicer_specification]]
Using an MDX query in SSMS is similar to using SQL.
You can open the query window by simply tapping new.
Let's run the first query to test: Find members of different axes and corresponding cell values.
We can paste the complex query statements generated in SSDT just now:
SELECT NON EMPTY {[Measures]. [Sales Amount]} on COLUMNS,
NON EMPTY {([Dim Sales Territory]. [Sales Territory Group]. [Sales Territory Group]. allmembers * [Dim Promotion]. [中文版 Promotion Category]. [中文版 Promotion Category]. allmembers ) } DIMENSION PROPERTIES member_caption,
Member_unique_name on ROWS from ( SELECT ({[Dim Sales territory].[ Sales Territory Group].&[europe]})
on COLUMNS from [Adventure Works DW2012]) CELL PROPERTIES VALUE,
back_color, fore_color, formatted_value, format_string, font_name , font_size, font_flags
You can see the same results after execution.
The automatic generation of statements through the visual interface helps us learn, and it's a good way to learn when it comes to problems.
Iii. Summary
At this point, we have introduced the preliminary use of the SSAS-related tools.
You need to familiarize yourself with the development interface of SSDT and familiarize yourself with the commonly used MDX syntax (about MDX now you need to do a preliminary understanding, and follow-up articles have a feature that will list the common scenarios)
The next chapter will be gradually deepened, in-depth commentary on the topic.
List of related articles:
- BI's SSAS complete Combat Tutorial 3--Create the first cube @20160907
- BI's SSAS full combat tutorial 2--development environment introduction and cube data source preparation @20160823
- BI's SSAS full combat Tutorial 1--Opening, Bi Introduction & SSAS Introduction @20160816
Starting blog Garden by Miroyuan, reprinted article must be in the article page obvious location to the author and the original link , otherwise reserves the right to pursue legal responsibility.
BI's SSAS full combat tutorial 4-Deploy to SSAS for a simple analysis