SAS Viya
SAS Viya
This page outlines the steps to install and configure the CData Connect Cloud connector for SAS Viya. After installation, SAS Viya can pull data from sources that you have connected to your CData Connect Cloud account.
Prerequisites
Before you can configure and use SAS Viya with CData Connect Cloud, you must first connect a data source to your CData Connect Cloud 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 Viya to CData Connect Cloud through the JDBC driver, follow these steps.
- Download and install the CData Connect Cloud JDBC driver.
- Open the Client Tools page of CData Connect Cloud.
- In the Dev Tools section, click JDBC.
- Download and run the setup file.
- When the installation is complete, the JAR file can be found in the installation directory.
-
Log into SAS Viya.
-
Click on the navigation button on the upper left.
-
Click Develop Code and Flows.
-
Upload the CData Connect Cloud JDBC JAR file.
- Right click on a directory.
- Click on Upload Files.
- Choose the CData Connect Cloud JDBC JAR file.
-
Place the JAR file of the CData Connect Cloud JDBC driver in any directory and note its file path.
-
Click on the Libraries icon in the left vertical navigation bar.
-
Click on the connection symbol in the top left under Libraries to create a new library for the JDBC connection.
-
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
-
Click the Properties tab and set Library attributes to READONLY.
-
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
-
Click on Test connection. If it succeeds, click Save and connect.
-
Click the “+” to add a new tab and select SAS program.
- 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—enter your CData Connect Cloud username. This is displayed in the top-right corner of the CData Connect Cloud interface. For example, test@cdata.com.
- DefaultCatalog—enter the connection configured in CData Connect Cloud that you want to query.
- Password—enter the PAT you generated on the Settings page.
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;
- Click Run. You can see the data load from CData Connect Cloud into SAS Viya.