Data Source Views (Multidimensional Modeling)

A Data Source View (DSV) acts as an abstraction layer between your Analysis Services multidimensional model and the underlying relational data sources. It allows you to define a unified, logical view of data from one or more relational databases, simplifying the modeling process and enabling powerful data manipulation capabilities.

What is a Data Source View?

In SQL Server Analysis Services (SSAS) multidimensional projects, a DSV is a metadata object that represents the tables and views from your data sources. You can perform various operations within the DSV designer:

Benefits of Using Data Source Views

Key Components of a Data Source View

Creating and Managing Data Source Views

You can create and manage Data Source Views using SQL Server Data Tools (SSDT) for Visual Studio.

Steps to Create a DSV:

  1. In your Analysis Services multidimensional project, right-click the Data Source Views folder and select New View.
  2. The Data Source View Designer will open, showing available data sources.
  3. Select the tables and views you want to include in your DSV and click Add.
  4. Define relationships between tables by dragging a column from one table to the corresponding column in another.
  5. Right-click on tables or columns to rename them, define keys, or create calculated members.
  6. Save your Data Source View.
Note: Ensure that the user account running the Analysis Services service has appropriate permissions to access the underlying relational data sources.

Example: Defining a Calculated Column

Suppose you have a Sales table with columns Quantity and UnitPrice, and you want to create a calculated column named ExtendedPrice.

In the DSV Designer:

  1. Right-click the Sales table and select New Calculated Column.
  2. In the Properties window, set the Name to ExtendedPrice.
  3. In the expression editor, enter the following formula:
    [Quantity] * [UnitPrice]

This calculated column will be available in your cube for analysis.

Advanced Scenarios

Tip: Regularly review your Data Source Views to ensure they accurately reflect your business requirements and are optimized for performance.

By effectively utilizing Data Source Views, you can build robust, scalable, and maintainable multidimensional models in SQL Server Analysis Services.


Last Updated: October 26, 2023