Previous Page | Next Page

MDX Queries and Syntax

MDX Drillthrough

The DRILLTHROUGH statement is used in Multidimensional Expressions (MDX) to retrieve the source rowset or rowsets from the source data for a cube cell or specified tuple. This statement enables a client application to retrieve the rowsets that were used to create a specified cell in a cube. An MDX statement is used to specify the subject cell. All of the rowsets that make up the source data of that cell are returned. The total number of rowsets that are returned can also be afected by the MAXROWS and FIRSTROWSET modifiers. Not all cubes support drill-through. Only cubes that have a drill-through table that is specified at cube creation support drill-through.

Here is the syntax for the DRILLTHROUGH statement:

<drillthrough>    :=DRILLTHROUGH [<maxrows>][<firstrowset>] <MDX select>
   <maxrows>     := MAXROWS <positive number>     
   <firstrowset> := FIRSTROWSET <positive number>
   

MAXROWS

indicates the maximum number of rows that should be returned by the resulting rowset.

FIRSTROWSET

specifies the first rowset to return.


Specifying the Maximum Number of Drill-Through Rows

You can limit the number of drill-through rows that users request in a query by selecting the OLAP srver definition setting Maximum number of flattened rows from SAS Management Console. This setting controls the maximum number of flattened rows that are allowed for flattened (two-dimensional) data sets.

  1. In the tree view for the Server Manager plug-in of SAS Management Console, select the node for your OLAP server. This is the physical OLAP server and is located by drilling down from the top of the Server Manager tree view.

  2. After selecting the physical OLAP server, right-click and select Properties.

  3. At the SAS OLAP Server Properties dialog box, select the Options tab, and then the Advanced Options button.

  4. At the Advanced Options dialog box, select the Server tab and enter the needed value for the Maximum number of flattened rows field. The default setting is 300,000 rows.


Ensuring That Tables Are Accessible at Query Time

Data that is external to a cube must be available to the SAS OLAP Server under the following conditions:

To ensure that the necessary tables are accessible at query time, the applicable library names need to be allocated when the OLAP server that is associated with the OLAP schema that contains the cubes is invoked. For more information, see the SAS Intelligence Platform: Data Administration Guide and the SAS Intelligence Platform: System Administration Guide.

Note:   If any of the tables contain user-defined formats, then the SAS OLAP Server also needs information about how to find those formats. User-defined formats cannot be used with drill-through tables.  [cautionend]


Working with User-Defined Formats

If you have existing SAS data sets, you might also have a catalog of user-defined formats and informats. You have two options for making these formats available to applications such as SAS Data Integration Studio:

Previous Page | Next Page | Top of Page