LASR Procedure

Example 4: Load a Table from Teradata to Memory

Details

This PROC LASR example demonstrates how to load a table to memory from Teradata. The native database client for Teradata and SAS/ACCESS Interface to Teradata must be installed and configured on the client machine.
libname tdlib teradata server="dbccop1.example.com" 1
    database=hps user=dbc password=dbcpass;

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

    performance host="tms.example.com" 2
        install="/opt/TKGrid"
        dataserver="dbccop1.example.com"; 3

run;

proc lasr add data=tdlib.tabletwo (label = "Table description") 4
    port=10010; 
    format revenue dollar20.2
           units comma9; 5
run;

Program Description

  1. The SERVER= option in the LIBNAME statement specifies the host name for the Teradata database.
  2. The HOST= option in the PERFORMANCE statement specifies the host name of the Teradata Management Server (TMS).
  3. The DATASERVER= option in the PERFORMANCE statement specifies the same host name for the Teradata database that is used in the LIBNAME statement.
  4. 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 Teradata does not support data set labels.
  5. SAS formats are applied with the FORMAT statement. Specifying the variable formats is useful for DBMS tables because database systems do not store formats.