This first example shows
how you can read the large Netezza table, FLIGHTS98, to create and
populate a SAS data set, SASFLT.FLT98:
libname sasflt 'SAS-library';
libname net_air netezza user=louis pwd=fromage
server=air2 database=flights;
proc sql;
create table sasflt.flt98
as select * from net_air.flights98
(bulkunload=YES bl_options='logdir "c:\temp\netlogs"');
quit;
You can use BL_OPTIONS=
to pass specific Netezza options to the unload process. The logdir
option specifies the directory for the nzbad and nzlog files to be
generated during the unload.
This next example shows
how you can append the contents of the Netezza table, ALLFLIGHTS,
to an existing SAS data set, SASFLT.FLT98. The BL_USE_PIPE=NO option
forces
SAS/ACCESS Interface to Netezza to read data from 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 unload has completed.
proc append base=sasflt.flt98
data=net_air.allflights
(BULKUNLOAD=YES
BL_DATAFILE='/tmp/fltdata.dat'
BL_USE_PIPE=NO
BL_DELETE_DATAFILE=NO);
run;