DataDirect JDBC drivers are compliant with the Type 4 architecture, but provide advanced features that define them as Type 5 drivers. Additionally, the drivers consistently support the latest database features and are fully compliant with Java™ SE 8 and JDBC 4.0 functionality.

The DataDirect JDBC Driver for VMware Greenplum is available for download from Broadcom Support Portal under the specific Greenplum release.

Prerequisites

  • The DataDirect JDBC Driver requires Java SE 8 or higher. See Installer Requirements in the DataDirect documentation for information and requirements associated with specific features of the JDBC driver.
  • The license key is embedded in the greenplum.jar file itself. You do not need to apply a specific license key to the driver to activate it.

Parent topic:DataDirect JDBC Driver for VMware Greenplum

Downloading the DataDirect JDBC Driver

To install the JDBC driver on your client:

  1. Log into Broadcom Support Portal, select the desired Greenplum release and download the DataDirect JDBC driver file: PROGRESS_DATADIRECT_JDBC_DRIVER_PIVOTAL_GREENPLUM_5.1.4.zip.

    Note

    For more information about download prerequisites, troubleshooting, and instructions, see Download Broadcom products and software.

  2. Follow the instructions in Verifying the Greenplum Database Software Download to verify the integrity of the Progress DataDirect JDBC Driver software.

  3. Extract the downloaded ZIP file.

  4. Add the full path to the PROGRESS_DATADIRECT_JDBC_DRIVER_PIVOTAL_GREENPLUM_5.1.4.jar to your Java CLASSPATH environment variable, or add it to your classpath with the -classpath option when executing a Java application.

Parent topic:DataDirect JDBC Driver for VMware Greenplum

Obtaining Version Details for the Driver

To view the JDBC driver version information:

  1. Change to the directory that contains the downloaded PROGRESS_DATADIRECT_JDBC_DRIVER_PIVOTAL_GREENPLUM_5.1.4.jar driver file. For example:

    $ cd /opt/Progress/DataDirect/Connect_for_JDBC_51/lib
    
  2. Execute the data source class to display the version information.

    For Linux/Unix systems:

    $ java -classpath PROGRESS_DATADIRECT_JDBC_DRIVER_PIVOTAL_GREENPLUM_5.1.4.jar com.pivotal.jdbc.GreenplumDriver
    [Pivotal][Greenplum JDBC Driver]Driver Version: 5.1.4.000223 (F000432.U000208)
    

    For Windows systems:

    java -classpath .;.\greenplum.jar com.pivotal.jdbc.GreenplumDriver
    [Pivotal][Greenplum JDBC Driver]Driver Version: 5.1.4.000223 (F000432.U000208)
    

Parent topic:DataDirect JDBC Driver for VMware Greenplum

Usage Information

The JDBC driver is provided in the greenplum.jar file. Use the following data source class and connection URL information with the driver.

Property Description
Driver File Name greenplum.jar
Data Source Class com.pivotal.jdbc.GreenplumDriver
Connection URL jdbc:pivotal:greenplum://host:port;DatabaseName=<name>
Driver Defaults FetchTWFSasTime=true
MaxLongVarcharSize=8190
MaxNumericPrecision=28
MaxNumericScale=6
PrepareThreshold=0
ResultSetMetadataOptions=1
SupportsCatalogs=true

Parent topic:DataDirect JDBC Driver for VMware Greenplum

Configuring Prepared Statement Execution

The DataDirect JDBC driver version 5.1.4.000270 (F000450.U000214) introduced support for the PrepareThreshold connection property. This property specifies the number of prepared statement executions to be performed before the driver switches to using server-side prepared statements.

The PrepareThreshold default value is 0, always use server-side prepare for prepared statements. This setting preserves the behavior of previous versions of the JDBC driver.

When the PrepareThreshold value is greater than 1, it specifies on which execution of a prepared statement the driver starts using server-side prepared statements.

Note

statement.executeBatch() always uses server-side prepare for prepared statements. This matches the behavior of the PostgreSQL open source JDBC driver.

Refer to PrepareThreshold in the DataDirect documentation for additional information about this connection property.

Limitation

When the PrepareThreshold value is greater than one and the prepared statement includes parameterized operations, the driver does not send any SQL prepare calls during connection.prepareStatement(). The driver instead sends the query all at once, at execution time. This requires that the driver determine the data types of every column before it sends the query to the server. While the driver can make this determination for many data types, it cannot for the JDBC types that can be mapped to multiple Greenplum data types:

  • BIT VARYING
  • BOOLEAN
  • JSON
  • TIME WITH TIME ZONE
  • UUIDCOL

To work around this limitation, set PrepareThreshold to 0 when a prepared statement uses parameterized values with any of the above data types. And use ResultSet.getMetaData() to determine if any of the above types are used in a query in advance of submitting the prepared statement.

Note

GPORCA does not support prepared statements that have parameterized values, and will fall back to using the Postgres Planner.

Parent topic:DataDirect JDBC Driver for VMware Greenplum

DataDirect Driver Documentation

For more information on working with the Data Direct JDBC driver, see documentation available online at https://docs.progress.com/category/datadirect-pivotal-greenplum.

Parent topic:DataDirect JDBC Driver for VMware Greenplum

check-circle-line exclamation-circle-line close-line
Scroll to top icon