IMXFER Procedure

Example 2: Copying Tables from One Cluster to Another

Details

It might be necessary to copy tables from one SAS LASR Analytic Server instance on one cluster to a server that is running on a different cluster. The clusters can have different numbers of machines.
When the number of machines is not the same, the IMXFER procedure automatically redistributes the rows of the table to provide the most even distribution possible. In most cases, equalizing the data distribution equalizes the work load and provides the best performance. By default, partitioned tables remain partitioned on the importing server. For more information, see the PARTITION= option for the TABLE statement.

Program

proc imxfer;
    server s1 host="grid001.example.com" port=10031; 1
    server s2 host="cluster2.example.com" port=10010;

    table s1 public.inventory s2 hps.inventory; 2
quit;


/* access the transferred table */
libname cluster2 sasiola host="cluster2.example.com" port=10010 tag="hps"; 3

proc imstat;
    table cluster2.inventory; 
run;

    distributioninfo; 4
quit;

Program Description

  1. The first SERVER statement creates a reference to the server that is listening on port 10031. The second SERVER statement creates a reference to a server on a different cluster that is listening on port 10010.
  2. The TABLE statement transfers the Public.Inventory table from the server that is listening on port 10031 to the server on the other cluster. The table is renamed to Hps.Inventory on the importing server.
  3. To access the transferred table, the LIBNAME statement must use the value "hps" as the server tag.
  4. The DISTRIBUTIONINFO statement for the IMSTAT procedure displays the number of rows that are used on each machine in the second cluster.