Procedure
Define a Data Source View
Having defined the Data
Source within our Analysis Services Project, our next steps surround
the creation of the Data Source View, a procedure that is customary at
this stage in most Analysis Services Projects. It is important to
realize, as we work with a "live" data connection that we have
defined, that we could certainly continue our development efforts with the
metadata without an open connection. The Data Source View provides
a single, unified view of the metadata from the tables and views that concern
us within our project.
NOTE: For more information on Data
Source Views, see my article Introduction
to MSSQL Server Analysis Services: Introducing Data Source Views at Database Journal.
To define a Data
Source View, we will take the following steps:
1.
Right-click Data
Source Views folder within the Solution Explorer.
2.
Select New
Data Source View from the context menu that appears, as depicted in Illustration
17.
The Data Source View Wizard
appears, opening with the Welcome to the Data Source View Wizard page,
as shown in Illustration 18.
We arrive at the Select
a Data Source
page, where we see our Adventure Works DW Data Source in the Relational
data sources list box on the left side of the page, as depicted in Illustration
19.
Illustration 19:
Adventure Works DW Appears in the Relational Data Sources
Our newly created Data
Source is positioned as the default, and will serve us in meeting the
objectives of our practice exercise. It is particularly useful to note, as we
have mentioned in Introducing
Data Source Views, as well as other articles, that we can
define a primary data source (a single Data Source like Adventure
Works DW is an example), and then add tables and views from secondary
data sources.
NOTE:
Heterogeneous queries are supported as long as one Data Source is a MSSQL
Server Data Source.
We arrive at the Select
Tables and Views
page, where we see the various tables of the Adventure Works DW data
source appear in the Available objects list box on the left of the page.
5.
Click FactResellerSales
in the Available objects list to select it.
6.
Click the button
marked > to move FactResellerSales to the Included objects list on the right half of the page, as
shown in Illustration 20.
Illustration 20:
Selecting a Table for Inclusion in the Data Source View
7.
Click the Add
Related Tables button, located underneath the Included objects list.
Several tables appear
within the Included objects list, as depicted in Illustration 21.
Illustration 21: Our
Tables Selection for the Data Source View
The Completing the
Wizard page appears, as shown in Illustration 22.
Illustration 22: The
Final Page of the Data Source View Wizard
As
indicated in the Completing the Wizard page, our selection includes the
following tables:
-
FactResellerSales
-
DimProduct
-
DimPromotion
-
DimCurrency
-
DimReseller
-
DimTime
-
DimSalesTerritory
-
DimEmployee
9. Click Finish to create the
new Data Source View, and to dismiss the Data Source View Wizard.
Our new Data Source View,
Adventure Works DW, appears in the Data Source Views folder within
the Solution Explorer window, as depicted in Illustration 23.
Illustration 23: The New
Data Source View in the Solution Explorer
The Data Source View
is also presented within the Data Source View Designer, which now opens within
Business Intelligence Development Studio, as shown in Illustration 24.
Illustration 24: The New
Data Source View in the Data Source View Designer
One of several designers
within the Studio, the Data Source View Designer for our new Data
Source View contains numerous elements that aid us in our organization and
design efforts. We can modify the composition of the tables that comprise our
view, as well as performing other activities, here. We will get some hands-on
exposure to one such activity, working with Named Calculations,
within the next section.