Skip Headers
Oracle® OLAP DML Reference
10g Release 2 (10.2)

Part Number B14346-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

PARTITIONCHECK

The PARTITIONCHECK function identifies whether an aggmap object is compatible with the partitioning specified by a partition template object.

Aggregation can cross partitions; however, the data flow must always be in one direction. The data cannot go both in and out of the same partition; this processing causes Oracle OLAP to produce an error during the aggregation.

Return Value

BOOLEAN.

YES when Oracle OLAP would not issue an error when aggregating a variable partitioned using the specified partition template using the specified aggmap; or NO when an error would occur.

Syntax

PARITITONCHECK (aggmap parttition-template)

Arguments

aggmap

A text expression that is the name of an aggmap object.

partition-template

A text expression that is the name of the partition template object that you want to check for compatibility with aggregation.

Examples

Assume that you have the following objects defined in your analytic workspace.

DEFINE YEAR_2003 DIMENSION TEXT
DEFINE YEAR_2002 DIMENSION TEXT
DEFINE PRODUCT DIMENSION TEXT
DEFINE SALES_2003 VARIABLE DECIMAL <YEAR_2003 PRODUCT>
DEFINE SALES_2002 VARIABLE DECIMAL <YEAR_2002 PRODUCT>
DEFINE TIME DIMENSION CONCAT (YEAR_2003 YEAR_2002) UNIQUE
DEFINE TIME_PARENTREL RELATION TIME <TIME>
DEFINE PART_TEMP_SALES_BY_YEAR PARTITION TEMPLATE <TIME PRODUCT> -
   PARTITION BY CONCAT (TIME) -
    (PARTITION PARTITION_2002 <YEAR_2002 PRODUCT> -
     PARTITION PARTITION_2003 <YEAR_2003 PRODUCT>)
DEFINE SALES VARIABLE DECIMAL <PART_TEMP_SALES_BY_YEAR <TIME PRODUCT>> -
    (PARTITION PARTITION_2002 EXTERNAL SALES_2002 -
     PARTITION PARTITION_2003 EXTERNAL SALES_2003)
DEFINE AGG_SALES AGGMAP
  AGGMAP
  RELATION time_parentrel OPERATOR SUM
  END
 

To determine if sales is partitioned in such a way that you can use agg_sales to aggregate it, issue the following statement. Since the statement returns a value of YES, you can safely use agg_sales to aggregate sales.

SHOW PARTITIONCHECK (agg_sales part_temp_sales_by_year)
yes