PARTITION= Table Option

Specifies the columns to use to partition the SASHDAT file.

Category: Table Control
Data source: SASHDAT file

Syntax

PARTITION=(column-list)

Arguments

column-list

specifies the column or columns to use to partition the SASHDAT file. The columns must already exist and cannot have been specified in the ORDERBY= table option. When multiple columns are specified, the column names must be separated by commas.

Details

Partitioning is available only when you create tables.
Partition keys are derived based on formatted values in the order of the column names in the column-list. All of the rows with the same partition key are stored in a single block. This ensures that all the data for a partition is loaded into memory on a single machine in the cluster. The blocks are replicated according to the default replication factor or the value that you specify in the COPIES= table option.
The partitioning columns, whether they are numeric or character, are formatted by applying SAS formatting rules. For more information, see FedSQL Formats. If user-defined formats are used, then the format name is stored with the table, but not the format. The format for the column must be available to the SAS LASR Analytic Server when the table is loaded into memory.
The key construction is not hierarchical. That is, PARTITION=(A, B) implies that any unique concatenation of formatted values for columns A and B defines a partition.
There is no ordering of the rows within a partition. You can create ordering within a partition by specifying the ORDERBY= option.

Example

The following example uses the PARTITION= table option to partition a table by the character variable REGION and the numeric variable DATE, where the date is formatted with the MONNAME3. format. The formatted values of the columns appear in the order in which the columns are specified in the PARTITION= option. Therefore, the keys for this example might look something like this: “EastJan”, “WestJan”, “NorthJan”, “SouthJan”., “EastFeb”, “WestFeb,” and so on.
create table sales{options partition=(region,"date")} 
(region char(10), "date" date having format monname3.);

See Also