DEFINE PARTITION TEMPLATE |
The DEFINE command with the PARTITION TEMPLATE keywords adds a new partition template object to an analytic workspace. A partition template is a specification for the partitions of a partitioned variable. A partitioned variable is stored as multiple rows in the relational table of LOBs that is the analytic workspace—each partition is a row in the table. You define both partitioned and unpartitioned variables using DEFINE VARIABLE statements. Before you can define a partitioned variable you must first define a partition template object.
Syntax
DEFINE name PARTITION TEMPLATE <dimlist> PARTITION BY
{RANGE|LIST|CONCAT} (dims_partitioned_by) ([partition_definition_statement...]) [AW workspace]
where:
partition_definition_statement defines a partition. The syntax varies depending on whether you specify RANGE, LIST, or CONCAT:
RANGE indicates partitioning by values within a specified range. The syntax for partition_definition_statements is:
PARTITION partition-name VALUES LESS THAN const-exp <partition-dimlist>
LIST indicates partitioning by listed values. The syntax for partition_definition_statements is:
PARTITION partition-name VALUES ([valuelist)] <partition-dimlist>
CONCAT indicates partitioning by base dimensions of a concat dimension. The syntax for partition_definition_statements is:
PARTITION partition-name <partition_basedimlist>
Arguments
The name of the object you are defining. For general information about this argument, see the main entry for the DEFINE command.
A list of all of the logical dimensions for the variable that you are partitioning. You must enclose the names of the dimensions in a single set of angle brackets (< >). You must define a dimension before you can include it in the definition of a partition template.
The subset of dimensions specified by dimlist that actually specify the partitions of the variable. For range and list partitioning (that is, when you specify either the RANGE or LIST keywords), you can specify only one dimension for dims_partitioned_by. You cannot partition a variable along an INTEGER dimension.
The name of the partition.
Indicates that you are specifying a RANGE partition by comparing values.
A constant expression that has the same data type as the data type of the dimension specified for dims_partitioned_by.
A list of all of the of dimensions of the partition template object (although the dimensions may be members of a composite). You must enclose the names of the dimensions in a single set of angle brackets (< >). Use this argument to specify the composite (if any) used to dimension the partitions that correspond to partition-name. When you do not specify a value then the partition is dimensioned densely by all of the of dimensions of the partition template object.
Indicates that you are specify a LIST partition by specifying values.
A list of dimension values, separated by commas. You must surround text values with single quotes (for example, 'mytext'). Specify values of conjoints by specify the values of the base dimensions, separated by a comma, in a single set of angle brackets (for example, <'Value1', 'Value2'>). Specify values of nonunique concat dimensions by specify the values of the base dimensions, separated by a colon, in a single set of angle brackets (for example, <'Value1': 'Value2'>).
|
Tip: I f you want to use a valueset object to specify values, do not specify values for valuelist. Instead, omit valuelist from the partition template definition and use a MAINTAIN MOVE TO PARTITION statement to specify values for the partition. |
A list of dimensions for the partition enclosed in a single set of angle brackets (< >). For every dimension of the partition template, basepartition-dimlist must include either that dimension, a base of that dimension, a concat of the base dimensions of that dimension, or a composite that includes that dimension, its base, or concat dimension of its base dimensions. In other words, basepartition-dimlist must have the same number of logical dimensions as the partition template itself (that is, the dimensions in dimlist).
Each listed dimension must be one of the following:
A partition template object with the appropriate dimensionality specified for its dimlist parameter.
A base dimension for one of the dimensions listed in dims_partitioned_by.
A dimension of the partition template that is not in dims_partitioned_by.
A composite consisting of dimensions of partition template object with the appropriate dimensionality specified for its dimlist parameter, a base dimension for one of the dimensions listed in dims_partitioned_by, or a dimension in dimlist that is not in dims_partitioned_by.
Examples
Examples of defining partition template objects are integrated into the following examples of defining partitioned variables: