Enable the SAS xpt JDBC Driver in KNIME

Ready to get started?

Download for a free trial:

Download Now

Learn more:

SASxpt JDBC Driver

Rapidly create and deploy powerful Java applications that integrate with SAS xpt (XPORT) files data.



Use standard data access components in KNIME to create charts and reports with SAS xpt data.

One of the strengths of the CData JDBC Driver for SAS xpt is its cross-platform support, enabling integration with major BI tools. Follow the procedure below to access SAS xpt data in KNIME and to create a chart from SAS xpt data using the report designer.

Define a New JDBC Connection to SAS xpt Data

  1. Install the Report Designer extension: Click File -> Install KNIME Extensions, and filter on "Report".
  2. In a new workflow, click File -> Preferences and expand the KNIME -> Databases node to add cdata.jdbc.sasxpt.jar. The driver JAR is located in the lib subfolder of the installation directory.
  3. In the Node Repository view, expand the Database -> Read/Write node and drag a Database Reader onto the workflow editor.
  4. Double-click the Database Reader and set the following properties:

    • Database Driver: In the menu, select the driver name, cdata.jdbc.sasxpt.SASXptDriver
    • Database URL: Enter the connection properties. The JDBC URL begins with jdbc:sasxpt: and is followed by a semicolon-separated list of connection properties.

      Connecting to Local SASXpt Files

      You can connect to local SASXpt file by setting the URI to a folder containing SASXpt files.

      Connecting to S3 data source

      You can connect to Amazon S3 source to read SASXpt files. Set the following properties to connect:

      • URI: Set this to the folder within your bucket that you would like to connect to.
      • AWSAccessKey: Set this to your AWS account access key.
      • AWSSecretKey: Set this to your AWS account secret key.
      • TemporaryLocalFolder: Set this to the path, or URI, to the folder that is used to temporarily download SASXpt file(s).

      Connecting to Azure Data Lake Storage Gen2

      You can connect to ADLS Gen2 to read SASXpt files. Set the following properties to connect:

      • URI: Set this to the name of the file system and the name of the folder which contacts your SASXpt files.
      • AzureAccount: Set this to the name of the Azure Data Lake storage account.
      • AzureAccessKey: Set this to our Azure DataLakeStore Gen 2 storage account access key.
      • TemporaryLocalFolder: Set this to the path, or URI, to the folder that is used to temporarily download SASXpt file(s).

      Built-in Connection String Designer

      For assistance in constructing the JDBC URL, use the connection string designer built into the SAS xpt JDBC Driver. Either double-click the JAR file or execute the jar file from the command-line.

      java -jar cdata.jdbc.sasxpt.jar

      Fill in the connection properties and copy the connection string to the clipboard.

      When you configure the JDBC URL, you may also want to set the Max Rows connection property. This will limit the number of rows returned, which is especially helpful for improving performance when designing reports and visualizations.

      A typical JDBC URL is below.

      jdbc:sasxpt:URI=C:/folder;
    • User Name: The username used to authenticate.
    • Password: The password used to authenticate.
    • SQL Statement: Enter an SQL query in the SQL Statement box or double-click a table. This article uses the query below to create a chart: SELECT Id, Column1 FROM SampleTable_1 WHERE Column2 = '100'
  5. Test the connection by clicking Fetch Metadata.

  6. Connect the Database Reader to a Data to Report node to supply the dataset to a range of data visualization controls. Click Execute and then click Edit Report at the top of the workflow to open the report designer perspective.
  7. You can now generate reports based on live data. To create a chart, drag the chart control from the palette to the report designer. In the resulting wizard, you can use the filtering and aggregation controls available in KNIME.

Troubleshooting

The following list shows how to resolve common errors:

  • Encountered duplicate row Id "Row1": To resolve this error, add the following to the knime.ini file located in your KNIME installation directory:-Dknime.database.fetchsize=0