This first example shows
how you can use a SAS data set, SASFLT.FLT98, to create and load a
Greenplum table, FLIGHTS98.
libname sasflt 'SAS-data-library';
libname mydblib greenplm host=iqsvr1 server=iqsrv1_users
db=users user=iqusr1 password=iqpwd1;
proc sql;
create table net_air.flights98
(BULKLOAD=YES
BL_DATAFILE='c:\temp\greenplum\data.dat'
BL_USE_PIPE=NO
BL_DELETE_DATAFILE=yes
BL_HOST='192.168.x.x'
BL_PORT=8081)
as select * from sasflt.flt98;
quit;
This next example shows
how you can append the SAS data set, SASFLT.FLT98, to the existing
Greenplum table ALLFLIGHTS. The BL_USE_PIPE=NO option forces
SAS/ACCESS
Interface to Greenplum 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 leave it after the load has completed.
proc append base=new_air.flights98
(BULKLOAD=YES
BL_DATAFILE='c:\temp\greenplum\data.dat'
BL_USE_PIPE=NO
BL_DELETE_DATAFILE=yes
BL_HOST='192.168.x.x'
BL_PORT=8081)
data=sasflt.flt98;
run;