SAS/ACCESS Interface to Aster nCluster |
Loading |
Bulk loading is the fastest way to insert large numbers of rows into an Aster nCluster table. To use the bulk-load facility, specify BULKLOAD=YES. The bulk-load facility uses the Aster nCluster loader client application to move data from the client to the Aster nCluster database. See BULKUNLOAD= Data Set Option.
Here are the Aster nCluster bulk-load data set options. For detailed information about these options, see Data Set Options for Relational Databases.
BL_DATAFILE=
BL_DBNAME=
BL_DELETE_DATAFILE=
BL_DELIMITER=
BL_HOST=
BL_OPTIONS=
BL_PATH=
BULKLOAD=
Examples |
This example shows how you can use a SAS data set, SASFLT.FLT98, to create and load a large Aster nCluster table, FLIGHTS98.
LIBNAME sasflt 'SAS-data-library'; LIBNAME net_air ASTER user=louis pwd=fromage server=air2 database=flights dimension=yes; PROC sql; create table net_air.flights98 (bulkload=YES bl_host='queen' bl_path='/home/ncluster_loader/' bl_dbname='beehive') as select * from sasflt.flt98; quit;
You can use BL_OPTIONS= to pass specific Aster nCluster options to the bulk-loading process.
You can create the same table using a DATA step.
data net_air.flights98(bulkload=YES bl_host='queen' bl_path='/home/ncluster_loader/' bl_dbname='beehive'); set sasflt.flt98; run;
You can then append the SAS data set, SASFLT.FLT98, to the existing Aster nCluster table, ALLFLIGHTS. SAS/ACCESS Interface to Aster nCluster to write data to a flat file, as specified in the BL_DATAFILE= option. Rather than deleting the data file, BL_DELETE_DATAFILE=NO causes the engine to retain it after the load completes.
PROC append base=net_air.allflights (BULKLOAD=YES BL_DATAFILE='/tmp/fltdata.dat' BL_HOST='queen' BL_PATH='/home/ncluster_loader/' BL_DBNAME='beehive' BL_DELETE_DATAFILE=NO ) data=sasflt.flt98; run;
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.