Copying data in-database results in faster copy times because the data does not have to be loaded into or moved out of SAS. You can run the COPY procedure in-database to copy Vertica data from one schema to another. In this case, the librefs for the IN= and OUT= options for PROC COPY must match for the SERVER=, PORT=, and DATABASE= values. To copy data in-database, the user who is specified for the IN= location must have Read permission for that location. Also, the user who is specified for the OUT= location must have Read permission for the IN= location and Write permission for the OUT= location.
Here are some points to keep in mind when you copy data in-database:
To verify whether the COPY procedure ran in-database, specify MSGLEVEL=i in the OPTIONS statement.
This example shows how to copy data in Vertica between schemas in a database. This example copies the my_table table from inschema schemainto the outsch schema. By specifying the REPLACE system option, you ensure that, if the destination table already exists, it is replaced by the COPY procedure. The ACCEL option for the PROC COPY statement is enabled by default. This option controls whether data is copied in-database.
libname vtin vertica user="myusr1 " database=mydb1 port=5433
server="mysrv1" password=mypwd1 schema=inschema;
libname vtout vertica user="myusr1" database=mydb1 port=5433
server="mysrv1" password=mypwd1 schema=outsch;
options replace;
proc copy in=vtin out=vtout;
select my_table;
run;
proc contents data=vtout.my_table;run;