The OLAP Procedure |
The AGGREGATION statement defines an aggregation of the cube based on level information that you provide.
AGGREGATION level-name <level-name2 level-name3 ...level-nameN> / <option(s)>; |
You can specify level names that are associated with an unsummarized data source, or you can specify level names that match columns in a table that contains existing aggregated data. The levels can exist in more than one dimension. You do not need to include dimension names, because level names must be unique across dimensions.
Here is an example of an AGGREGATION statement that specifies three levels and uses the NAME= option. The slash character ( / ) is required to separate level names from option specifications.
aggregation country prodtype year / name='Product Types by Country';
Required Arguments |
is the level that is to be used to create the aggregation. Additional level names are optional. Names are separated by spaces. Names are separated from option specifications with a required slash character ( / ). You do not have to include all levels that are specified in all HIERARCHY statements, but the names that you do specify must match the names that are used in the HIERARCHY statements. You can include a TABLE= option to identify a table that contains existing aggregated information for your specified levels. The levels that you specify must match columns in the input table.
Restriction: | Levels must be listed in drill-path order. You cannot specify an aggregation that contains a summary level that could never be requested. For example, if your TIME hierarchy contains the levels Year, Month, and Day, you could specify Year and Month as an aggregation, but not Month by itself. |
Options |
Note: For a list of the options that can be used to optimize cube creation and query performance, see Options Used for Performance.
specifies whether or not to store the aggregation table in a compressed format on disk.
Default: | NOCOMPRESS |
specifies the location of one or more partitions in which to place aggregation table data. The data is distributed by cycling through each partition location according to the partition size. This is set by using the PARTSIZE= option. For example, if you specify DATAPATH=('C:\data1' 'D:\data2'), then PROC OLAP places the first partition of the aggregation table into directory C:\data1, the second partition of the table into directory D:\data2, the third partition of the table into C:\data1, and so on. It is also possible to have aggregation tables that use fewer than the specified number of partitions. For example, your aggregation table might fit entirely into C:\data1.
Default: | The cube subdirectory of the location that is specified by the PATH= option in the PROC OLAP statement |
specifies whether or not to create the specified aggregation with indexes. For faster cube creation and updates, you can set this option to NOINDEX. However, the lack of indexes might adversely affect query performance.
Note: Indexes are not created for aggregations that have fewer than 1,024 records.
Default: | INDEX |
specifies the locations of the index component files that correspond to each aggregation table partition as specified by the DATAPATH= option.
Default: | The cube subdirectory of the location that is specified by the PATH= option in the PROC OLAP statement |
specifies a maximum of 256 characters as the name of the aggregation. If the name includes blank spaces or any characters that are not permitted in a valid SAS name, then the name must be enclosed within quotation marks. The name is stored with the cube's metadata.
Default: | A name assigned by SAS, such as AGGR1. |
specifies the partition size in megabytes of the aggregation table partitions and their corresponding index components.
Default: | 128 megabytes. The minimum value is 16. |
specifies the number of observations (table rows) in the file segment of the index component. The value is expressed in multiples of 1,024. The minimum value is 1 (1,024 rows). The segmented indexes are used to optimize the processing of WHERE expressions. Each parallel thread is given a segment of the table to evaluate that is equal to the value of the SEGSIZE= option multiplied by 1,024.
Default: | 8 (8 x 1,024 = 8,192 rows) |
Interaction: | The value of this option overrides for the current aggregation any such value that was specified for all aggregations in the PROC OLAP statement. |
specifies the name of a SAS data set or data view that contains the data for one aggregation. Every level that is listed in the AGGREGATION statement must match a column that contains aggregation information in the specified table. Place this option after the list of level names.
Analysis columns in the table are mapped to the numeric columns that are specified with the AGGR_COLUMN= option in MEASURE statements.
You can also set data set options with TABLE=. Options are stored within the cube and reapplied when the data is accessed at run time. For more information, see "Data Set Options" in SAS Language Reference: Concepts.
Restriction: | You cannot use the TABLE= option in an AGGREGATION statement that is used to add an aggregation to an existing cube. |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.