SAS Visual Analytics


SAS Visual Analytics


This page outlines the steps to install and configure the CData Connect connector for SAS Visual Analytics. After installation, SAS Visual Analytics can pull data from sources that you have connected to your CData Connect account.

Prerequisites

Before you can configure and use SAS Visual Analytics with CData Connect, you must first connect a data source to your CData Connect account. See Connections for more information.

You must also generate a Personal Access Token (PAT) on the Settings page. Copy this down, as it acts as your password during authentication.

Connecting to CData Connect Cloud

To establish a connection from SAS Visual Analytics to the CData Connect Virtual SQL Server API, follow these steps.

  1. Download and install the CData Connect JDBC Driver.
    1. Open the Client Tools page of CData Connect.
    2. In the Dev Tools section, click JDBC.
    3. Download and run the setup file.
    4. When the installation is complete, the JAR file can be found in the installation directory.
  2. Log into SAS Visual Analytics.

  3. Click on the navigation button on the upper left.

  4. Click Develop Code and Flows.

  5. Upload the CData Connect JDBC JAR file.

    • Right click on a directory.
    • Click on Upload Files.
    • Choose the CData Connect JDBC JAR file.
  6. Place the JAR file of the CData Connect JDBC driver in any directory and note its file path.

  7. Click on the Libraries icon in the left vertical navigation bar.

  8. Click on the connection symbol in the top left under Libraries to create a new library for the JDBC connection.

  9. Enter the library connection settings.

    • Connection name—enter a name for your connection
    • Library name (libref)—enter a reference for your library
    • Library type—choose SAS/ACCESS to JDBC

  10. Click the Properties tab and set Library attributes to READONLY.

  11. Click the Connection Options tab and enter the following details.

    • Hive JDBC driver’s class name—enter cdata.jdbc.connect.ConnectDriver
    • Java CLASSPATH—enter the file path to the JAR driver file

  12. Click on Test connection. If it succeeds, click Save and connect.

  13. Click the “+” to add a new tab and select SAS program.

  14. Fill in the code block below with your setup parameters.
    • Libref—enter the library reference you defined in Step 9.
    • ClassPath—enter the file path to the JAR driver file.
    • Username—CData Connect のユーザー名を入力します。ユーザー名は、CData Connect の画面の右上に表示されています。例:test@cdata.co.jp
    • DefaultCatalog—enter the connection configured in CData Connect that you want to query.
    • PasswordSettings ページで生成したPAT を入力します。
    libname [Libref] JDBC  
    classpath=[ClassPath] 
    class="cdata.jdbc.connect.ConnectDriver"    
    URL="jdbc:Connect:AuthScheme=Basic;User=[Username];DefaultCatalog=[DefaultCatalog];DefaultSchema=dbo;Password=[Password]";
    
    proc sql;
    
    SELECT * FROM [Libref].MyTable;
    
    quit;
    
  15. Click Run. You can see the data load from CData Connect into SAS Visual Analytics.