The following example shows how to use a DATA step to copy a data set to a Teradata database; the table is distributed by
a column called from_node
:
libname linkdata 'C:\mydata'; libname tdlib teradata server = "grid001.example.com" user = dbuser password = dbpass database = hps; proc datasets nolist lib=tdlib; delete links_data_123; quit; data tdlib.links_data_123 (bulkload=yes dbcommit=10000000 DBCREATE_TABLE_OPTS="primary index(from_node)"); set linkdata.links_data_123; run;
If the output table links_data_123
already exists in the Teradata database, the call to PROC DATASETS removes the table from the database, because a DBMS usually
does not support replacement operations on tables.