Previous Page | Next Page

The LIBNAME Statement for Relational Databases

PARTITION_KEY= LIBNAME Option



Specifies the column name to use as the partition key for creating fact tables.
Default value: none
Valid in: SAS/ACCESS LIBNAME statement
DBMS support: Aster nCluster

Syntax
Details
Examples
See Also

Syntax

PARTITION_KEY='column-name'

Details

You must enclose the column name in quotation marks.

Aster nCluster uses dimension and fact tables. To create a data set in Aster nCluster without error, you must set both the DIMENSION= and PARTITION_KEY= (LIBNAME or data set) options.


Examples

This first example shows how you can use the SAS data set, SASFLT. flightschedule, to create an Aster nCluster dimension table, flightschedule.

LIBNAME sasflt 'SAS-data-library';
LIBNAME net_air ASTER user=louis pwd=fromage server=air2 database=flights;

data net_air.flightschedule(dimension=yes);
  set sasflt. flightschedule;
run;

You can create the same Aster nCluster dimension table by setting DIMENSION=YES.

LIBNAME sasflt 'SAS-data-library';
LIBNAME net_air ASTER user=louis pwd=fromage server=air2 
        database=flights dimension=yes;

data net_air.flightschedule;
  set sasflt. flightschedule;
run;

If you do not set DIMENSION=YES by using either the LIBNAME or data set option, the Aster nCluster engine tries to create an Aster nCluster fact table. To do this, however, you must set the PARTITION_KEY= LIBNAME or data set option, as shown in this example.

LIBNAME sasflt 'SAS-data-library';
LIBNAME net_air ASTER user=louis pwd=fromage server=air2 database=flights;

data net_air.flightschedule(dbtype=(flightnumber=integer)
     partition_key='flightnumber');
  set sasflt. flightschedule;
run;

You can create the same Aster nCluster fact table by using the PARTITION_KEY= LIBNAME option.

LIBNAME sasflt 'SAS-data-library';
LIBNAME net_air ASTER user=louis pwd=fromage server=air2 database=flights
        partition_key='flightnumber';

data net_air.flightschedule(dbtype=(flightnumber=integer));
  set sasflt. flightschedule;
run;

The above examples use the DBTYPE= data set option so that the data type of the partition-key column meets the limitations of the Aster nCluster's partition key column.


See Also

To apply this option to an individual data set or a view descriptor, see the PARTITION_KEY= Data Set Option.

DIMENSION= Data Set Option

Previous Page | Next Page | Top of Page