LASR Procedure

Example 5: Load a Table from Greenplum to Memory

Details

This PROC LASR example demonstrates how to load a table to memory from Greenplum. The ODBC drivers and SAS/ACCESS Interface to Greenplum must be installed and configured on the client machine.
libname gplib greenplm server="mdw.example.com" 1
    database=hps user=dbuser password=dbpass;

proc lasr create port=10010
    data=gplib.sometable
    path="/tmp";

    performance host="mdw.example.com" 2
        install = "/opt/TKGrid";

run;

proc lasr add data=gplib.tabletwo (label = "Table description") 3
    port=10010;
    format y x1-x15 5.4
           dt date9.; 4
run;

Program Description

  1. The SERVER= option in the LIBNAME statement specifies the host name for the Greenplum database.
  2. The HOST= option in the PERFORMANCE statement specifies the host name of the Greenplum master host.
  3. The input data set option, LABEL=, associates the description with the data in the server instance. This option causes a warning in the SAS log because the SAS/ACCESS Interface to Greenplum does not support data set labels.
  4. SAS formats are applied with the FORMAT statement. Specifying the variable formats is useful for DBMS tables because database systems do not store formats.