Define a Data Source View
Our next steps surround the creation of the Data Source View, a procedure that is customary at this stage in both Analysis Services and Report Model 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 Add New Data Source View from the context menu that appears, as shown in Illustration 16.
Illustration 16: Initial Step in Creating a New Data Source View
The Data Source View Wizard appears, opening with the Welcome to the Data Source View Wizard page, as depicted in Illustration 17.
We arrive at the Select a Data Source page, where we see the Data Source we created in the previous section, RS028_Adventure Works, in the Relational data sources list box on the left side of the page, as shown in Illustration 18.
Illustration 18: Our New Data Source 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. A Data Source View for a Report Model Project, unlike a Data Source View for an Analysis Services Project, can only reference a single Data Source.
We arrive at the Select Tables and Views page, where we see the various tables of the Adventure Works data source appear in the Available objects list box on the left of the page.
5. Select all tables in the Available objects list, by clicking the button marked ">>", as depicted in Illustration 19.
Illustration 19: Selecting All Tables for Inclusion in the Data Source View ...
The tables in the Available objects list box move to the Included objects list on the right half of the page, as shown in Illustration 20.
Illustration 20: All Tables Selected for Inclusion in the Data Source View
The Completing the Wizard page appears.
7. Replace the name that appears in the Data source name box with the following:
The Completing the Wizard page appears, as depicted in Illustration 21.
Illustration 21: Completing the Wizard ...
8. Click Finish to create the new Data Source View, and to dismiss the Data Source Wizard.
The Wizard closes, and the new Data Source View appears in the Data Source Views folder within the Solution Explorer as shown in Illustration 22.
Illustration 22: The New Data Source View Appears in the Solution Explorer
We have defined a Data Source View that contains the metadata for the entire Adventure Works sample database. Naturally, we might have only entrained select tables, based upon the business requirements of the intended audience of the model, but for purposes of our practice session, this will serve to illustrate the concepts. We will next define our Report Model based upon some of this metadata, which designated information consumers can then use within the Report Builder.