This example starts the FastLoad facility.
libname fload teradata user=testuser password=testpass;
data fload.nffloat(bulkload=yes);
do x=1 to 1000000;
output;
end;
run;
This next example uses
FastLoad to append SAS data to an empty Teradata table and specifies
the BL_LOG= option to name the error tables
Append_Err1
and
Append_Err2
.
In practice, applications typically append many rows.
/* Create the empty Teradata table. */
proc sql;
connect to teradata as tera(user=testuser password=testpass);
execute (create table performers
(userid int, salary decimal(10,2), job_desc char(50)))
by tera;
execute (commit) by tera;
quit;
/* Create the SAS data to load. */
data local;
input userid 5. salary 9. job_desc $50.;
datalines;
0433 35993.00 grounds keeper
4432 44339.92 code groomer
3288 59000.00 manager
;
/* Append the SAS data & name the Teradata error tables. */
libname tera teradata user=testuser password=testpass;
proc append data=local base=tera.performers
(bulkload=yes bl_log=append_err);
run;
This example starts
the MultiLoad facility.
libname trlib teradata user=testuser pw=testpass server=dbc;
/* Use MultiLoad to load a table with 2000 rows. */
data trlib.mlfloat(MultiLoad=yes);
do x=1 to 2000;
output;
end;
run;
/* Append another 1000 rows. */
data work.testdata;
do x=2001 to 3000;
output;
end;
run;
/* Append the SAS data to the Teradata table. */
proc append data=work.testdata base=trlib.mlfload
(MultiLoad=yes);
run;
This example loads data
using TPT FastLoad.
/* Check the SAS log for this message to verify that the TPT API was used.
NOTE: Teradata connection: TPT Fastload has inserted 100 rows.
*/
data trlib.load(TPT=YES FASTLOAD=YES);
do x=1 to 1000;
output;
end;
run;
This example restarts
a MultiLoad step that recorded checkpoints and failed after loading
2000 rows of data.
proc append data=trlib.load(TPT=YES MULTILOAD=YES
TPT_RESTART=YES TPT_CHECKPOINT_DATA=2000)
data=work.inputdata(FIRSTOBS=2001);
run;