惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Blog — PlanetScale
Blog — PlanetScale
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Vercel News
Vercel News
B
Blog
腾讯CDC
P
Proofpoint News Feed
Google DeepMind News
Google DeepMind News
N
Netflix TechBlog - Medium
L
LangChain Blog
F
Fortinet All Blogs
T
The Blog of Author Tim Ferriss
人人都是产品经理
人人都是产品经理
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
I
InfoQ
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
D
DataBreaches.Net
Stack Overflow Blog
Stack Overflow Blog
The Cloudflare Blog
Last Week in AI
Last Week in AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 三生石上(FineUI控件)
T
Tailwind CSS Blog

博客园 - Love Fendi

性能优化系列---查询高cup的sql State模式学习 8.17--8.24积累 sql server 2005 analysis service step by step(三):创建父子维度 sql server 2005 analysis service step by step(二):创建时间维度 算法练习五:求数组中第k大的数 算法练习四:求N!不溢出 算法练习三:奇偶分割 算法练习二:二分查找 数据库锁 算法练习一:最大公约数与最小公倍数 索引优化 生成验证码,同时异步获取加密后的验证码 自定义控件中与脚本资源集成的若干处理方式 一条语句删除表中某字段重复的数据 动态按需异步加载js文件 在Nhibernate中使用Json.net中出现Self referencing loop的错误的处理 JQuery学习笔记 c#委托事件 入门
sql serve 2005 analysis service step by step(一):创建标...
Love Fendi · 2009-04-23 · via 博客园 - Love Fendi

一. add a datasource 新增数据源

Add a data source to an Analysis Services project
1. If necessary, start SQL Server Business Intelligence Development Studio (BIDS).
2. On the File menu, point to New, and then click Project.
3. In the New Project dialog box, click the Analysis Services Project template in the Templates
pane.
4. Type a name for the project: SSAS Step by Step.
5. If necessary, change the location for the project to C:\Documents and Settings
\<username>\My Documents\Microsoft Press\as2005sbs\Workspace, and click OK.
6. In Solution Explorer, right-click the Data Sources folder, click New Data Source, and
then click Next.
7. Click the New button to create a new connection.
8. In the Connection Manager dialog box, type a server name: localhost.
9. In the Select Or Enter A Database Name list box, select SSAS Step by Step DW.

10. Click Test Connection and then click OK to close the message box.
11. Click OK to close the Connection Manager dialog box.
12. Click Next.
13. On the Impersonation Information page of the Data Source Wizard, click Use The Service
Account and click Next.
14. To complete the wizard, click Finish.

新增数据源有一点要注意:模拟信息:选择服务账户

二. 创建数据源视图

    首先我们来看下为什么需要数据源视图。

    An important component of the UDM in Analysis Services is the DSV。UDM是统一定义模型,The UDM provides an intermediate logical layer between the physical relational database that is used as a data source and the proprietary cube and dimension structures that are used to resolve user queries.统一定义模型是数据源和数据立方体之间的逻辑层,you can pick and choose the data that you need for the dimensions and for the cube by creating a subset  view of the data warehouse.subset  view 就是数据源视图。

1. In Solution Explorer, right-click the Data Source Views folder, click New Data Source
View, and then click Next.
2. Click SSAS Step by Step DW to select the relational data source, and then click Next.
3. Double-click dbo.DimProduct to add it to the Included Objects list.
Alternatively, you can click on a table and then click the arrow pointing to the right
(which looks like a greater-than sign) to move it to the Included Objects list. You can
select multiple tables by pressing the Ctrl key while clicking on each table.
4. Repeat the previous step to add another

5. Click Next, and then click Finish.
You have the option to change the default DSV name before completing the wizard.
6. Save the solution.

三 创建一个维度

1. In Solution Explorer, right-click the Dimensions folder, click New Dimension, and then
click Next.

Clear the Auto Build check box, and then click Next.
3. Click the SSAS Step by Step DW data source view.
You can review the diagram for the DSV if you click Browse on this page of the wizard.
This feature is helpful when you have multiple DSV in a project and want to be sure that
you select the correct one.
4. Click Next.
The Select The Dimension Type page of the Dimension Wizard looks like this:

5. Click Next.

6. In the Key Columns list, select ProductKey, and then select EnglishProductName in the
Column Containing The Member Name drop-down list.注意这里,不然后面显示就是id,而不是productname

8. Click Next, and then, on the Select Dimension Attributes page of the wizard, select the
check box next to the following attributes: Color, List Price, and Size.

Select the check box to the left of Dim Product Subcategory, and then, in the same row,
click dbo.DimProductCategory.EnglishProductSubcategoryName in the Attribute
Name Column drop-down list.

Select the check box to the left of Dim Product Category, and then, in the same row, click
dbo.DimProductCategory.EnglishProductCategoryName in the Attribute Name Column
drop-down list.
11. Click Next.

12. On the Specify Dimension Type page, click Next.

13. On the Define Parent-Child Relationship page, click Next.
Since you’re not currently building a parent-child dimension, you don’t need to change
the Define Parent-Child Relationship page of the wizard. Later in this chapter, you will
learn more about working with this page of the wizard.
14. Change the name of the dimension from Dim Product to Product, and then click Finish.

四。部署维度,为什么要现在部署呢?因为如果你不部署,你将无法看到刚才建立的维度的信息。比较简单。

最后,将介绍两个设置,第一、设置Changing Attribute Properties,为什么需要设置这个呢?看下面的介绍:

When users browse a cube, they select
attribute hierarchies for grouping measure values, so you should be careful about which
attribute hierarchies are available for grouping data. In the current dimension, for example,
grouping by Category, Subcategory, Product, Color, or Size seems logical and desirable. However,
grouping by List Price is probably not useful. Typically, an attribute like this, which can
have a high number of distinct members relative to the leaf-level attribute, is used for filtering
purposes or for detailed reporting.

第二 .unknown member.为什么会出现这个呢?简单来说,这是由于数据不一致或者不完整现象导致的。unknown member有三种形式visible(默认),hidden,none,可以在维度的属性中设置。