Get started with Cassandra drivers
You can use Cassandra drivers to interact with your DataStax Enterprise (DSE) databases through the Cassandra Query Language (CQL).
To use a driver, you need to add the driver dependency to your project, initialize a driver session, and then connect the driver to your database. Once connected, your scripts can execute CQL statements against your database through the driver instance.
This documentation provides general guidance on application development with DSE-compatible drivers, including version compatibility, best practices, connection methods, statement execution, error handling, and performance tuning. Use this documentation in conjunction with the documentation for your chosen driver and general DSE documentation.
Specific features and capabilities vary by driver language and version. Features introduced in later versions of DSE might not be supported in earlier driver versions. DataStax recommends, whenever possible, that you use the latest version of your chosen driver to access the most recent features and improvements.
Cassandra drivers and DataStax drivers
The terms drivers for Apache Cassandra® and Cassandra drivers refer to all drivers that can be used with Cassandra-based databases.
Due to the open source nature of the Apache Software Foundation (ASF), Cassandra drivers are developed by different contributors, depending on source code ownership or primary responsibility. Drivers can be donated to the ASF for ongoing community maintenance. Several drivers developed by DataStax have been donated to the ASF. When a donation happens, the documentation is split between the original maintainer (pre-donation versions) and the ASF (post-donation versions).
The DSE documentation uses any of the following terms to refer to all DSE-compatible Cassandra drivers:
-
Cassandra drivers
-
DataStax-compatible drivers
-
Cassandra-compatible drivers
-
DSE-compatible drivers
When referring to a specific driver version, this documentation might use the maintainer’s prefix for clarity, such as DataStax Java driver or Apache Cassandra Java driver.
Supported drivers
DSE databases are compatible with the following Cassandra drivers:
| Language | Driver | Latest version | Documentation |
|---|---|---|---|
C++ |
|||
C# |
|||
Go |
|||
Java |
|||
Node.js |
|||
Python |
|||
Scala |
JDBC and ODBC drivers
A license is required to use the DataStax ODBC and JDBC drivers, which you can download from IBM Fix Central. For more information, visit IBM Support.
Other JDBC and ODBC drivers exist, such as cassandra-jdbc-wrapper, but compatibility isn’t verified.
Unverified drivers
DataStax strongly recommends using supported drivers whenever possible. Although other Apache Cassandra drivers might support the required CQL functionality, be aware of the following:
-
Unverified drivers aren’t tested by DataStax for compatibility with DSE databases.
-
Unverified drivers aren’t inherently covered by IBM Elite Support plans or other DSE support agreements. Connections using third-party open-source drivers over private links, with or without custom domains, aren’t supported by DataStax in any capacity.
-
Unverified drivers might not support important DSE features like certain authentication methods. If a maintainer claims support for a feature, there is no guarantee as to the robustness, security, or efficacy of the implementation.
-
Unverified drivers might not include features that harden the driver against coordinator IP address changes, which can cause frequent connection issues or failed connections.
Unsupported drivers
|
Driver versions that are in end-of-life (EOL), maintenance mode, or older than one year receive no updates, including security patches, unless otherwise announced in the driver’s release notes. DataStax recommends that you upgrade to a supported driver as soon as possible. |
Drivers become unsupported if they are declared deprecated or unmaintained by their maintainers, or if they no longer meet the requirements for compatibility with DSE databases. This can include individual driver versions, major version series, or all versions of a given driver.
DataStax officially supports the latest 12 months of releases for DSE-compatible drivers, and DataStax recommends using the latest driver version whenever possible. Compatibility isn’t guaranteed for earlier versions.
The following drivers are in EOL or maintenance mode:
-
GoCQL 1.x series
-
GoCQL Astra 1.x series
-
Java driver 3.x series
-
Java driver 2.x series
-
DataStax Ruby driver
-
DataStax PHP driver
-
All DSE-only drivers
Java driver 3.x series (Maintenance)
The 3.x series of the Java driver entered maintenance mode in 2023.
DataStax recommends that you upgrade to the 4.x series.
When upgrading, be aware that the artifacts for the 3.x series use the naming convention cassandra-driver-*, which is distinct from the 4.x series naming convention java-driver-*.
| Driver version | DSE 6.9 | DSE 6.8 | DSE 5.1 | Comments |
|---|---|---|---|---|
3.0 to 3.12 |
Partially compatible |
Partially compatible |
Partially compatible |
Starting with version 3.12, this driver is maintained by the Apache Software Foundation (ASF). Doesn’t support the vector type. Earlier versions be incompatible with DSE features like Unified Authentication. |
Java driver 2.x series (EOL)
The 2.x series of the Java driver has reached EOL. It was superseded by the 3.x series in 2016 and the 4.x series in 2019.
The 2.x series isn’t compatible with DSE 6.9, 6.8, or 5.1. DataStax recommends that you upgrade to the 4.x series.
DataStax Ruby and PHP drivers (Maintenance)
The DataStax Ruby driver and DataStax PHP driver (
php-driver) are in maintenance mode and they aren’t actively maintained.
If you need to support a legacy application, compatibility for these drivers is as follows:
-
DataStax Ruby driver:
-
DSE 6.9 and 6.8: Partially compatible with version 3.2 only. Earlier versions aren’t compatible. To support legacy Ruby applications, you can also use the DSE-only Ruby driver.
-
DSE 5.1: Partially compatible with version 3.0 to 3.2. Earlier versions aren’t compatible.
-
To support legacy Ruby and PHP applications, you can also use the DSE-only Ruby driver and the DSE-only PHP driver.
-
DataStax PHP driver:
-
DSE 6.9 and 6.8: Not compatible.
-
DSE 5.1: Partially compatible with version 1.2 to 1.3. Earlier versions aren’t compatible.
-
These drivers don’t support the vector type.
DSE-only drivers (EOL)
In 2020, DataStax unified the functionality from the DSE-only drivers into the Cassandra drivers. Development continues exclusively on the Cassandra drivers. Accordingly, the DSE-only drivers reached EOL in January 2022.
Limited compatibility information is provided if needed to support legacy applications. Don’t use these drivers for new applications.
Compatibility is based on the available DSE features at the time that a given driver version was released. It is implied that newer features aren’t supported because they didn’t exist.
DSE C/C++ driver (EOL)
The DSE-only C/C++ driver reached EOL in January 2022.
To upgrade, see the C/C++ driver upgrade guide.
If you need to support a legacy application, compatibility for the DSE-only C/C++ driver is as follows:
-
DSE 6.9 and 6.8:
-
Version 1.5 and later: Partially compatible. Supports legacy DSE Graph only. Doesn’t support DataStax Graph, which was introduced in DSE 6.8.
-
Version 1.2 to 1.4: Partially compatible. Limited to the DSE 5.1 API.
-
Version 1.0 to 1.1: Partially compatible. Limited to the DSE 5.0 API.
-
-
DSE 5.1:
-
Version 1.2 and later: Fully compatible.
-
Version 1.0 to 1.1: Partially compatible. Limited to the DSE 5.0 API.
-
DSE C# driver (EOL)
The DSE C# driver reached EOL in January 2022.
To upgrade, see the C# driver upgrade guide.
If you need to support a legacy application, compatibility for the DSE-only C# driver is as follows:
-
DSE 6.9 and 6.8:
-
Version 2.2 and later: Partially compatible. Supports legacy DSE Graph only. Doesn’t support DataStax Graph, which was introduced in DSE 6.8.
-
Version 2.0 to 2.1: Partially compatible. Limited to the DSE 5.1 API.
-
Version 1.0 to 1.1: Partially compatible. Limited to the DSE 5.0 API.
-
-
DSE 5.1:
-
Version 2.0 and later: Fully compatible.
-
Version 1.0 to 1.1: Partially compatible. Limited to the DSE 5.0 API.
-
DSE Java driver (EOL)
The DSE-only Java driver reached EOL in January 2022.
To upgrade, see the Java driver upgrade guide.
If you need to support a legacy application, compatibility for the DSE-only Java driver is as follows:
-
DSE 6.9 and 6.8:
-
Version 1.9 to 2.3: Not compatible.
-
Version 1.6 to 1.8: Partially compatible. Supports legacy DSE Graph only. Doesn’t support DataStax Graph, which was introduced in DSE 6.8.
-
Version 1.2 to 1.5: Partially compatible. Limited to the DSE 5.1 API.
-
Version 1.1: Partially compatible. Limited to the DSE 5.0 API.
-
Version 1.0: Not compatible.
-
-
DSE 5.1:
-
Version 1.2 to 2.3: Fully compatible.
-
Version 1.1: Partially compatible. Limited to the DSE 5.0 API.
-
Version 1.0: Not compatible.
-
DSE Node.js driver (EOL)
The DSE-only Node.js driver reached EOL in January 2022.
To upgrade, see Upgrading from the DSE Node.js driver.
If you need to support a legacy application, compatibility for the DSE-only Node.js driver is as follows:
-
DSE 6.9 and 6.8:
-
Version 2.3: Partially compatible. Supports legacy DSE Graph only. Doesn’t support DataStax Graph, which was introduced in DSE 6.8.
-
Version 1.3 to 2.2: Partially compatible. Limited to the DSE 5.1 API.
-
Version 1.0 to 1.2: Partially compatible. Limited to the DSE 5.0 API.
-
-
DSE 5.1:
-
Version 1.3 and later: Fully compatible.
-
Version 1.0 to 1.2: Partially compatible. Limited to the DSE 5.0 API.
-
DSE PHP driver (EOL)
The DSE-only PHP driver reached EOL in January 2022.
If you need to support a legacy application, compatibility for the DSE-only PHP driver is as follows:
-
DSE 6.9 and 6.8: Not compatible.
-
DSE 5.1:
-
Version 1.1: Fully compatible.
-
Version 1.0: Partially compatible. Limited to the DSE 5.0 API.
-
DSE Python driver (EOL)
The DSE-only Python driver reached EOL in January 2022, and the DSE-only Python driver Graph extension was merged into the unified Cassandra Python driver.
To upgrade, see the Python driver upgrade guide.
If you need to support a legacy application, compatibility for the DSE-only Python driver is as follows:
-
DSE 6.9 and 6.8:
-
2.x series: Partially compatible. Limited to the DSE 5.1 API.
-
1.x series: Partially compatible. Limited to the DSE 5.0 API.
-
-
DSE 5.1:
-
2.x series: Fully compatible.
-
1.x series: Partially compatible. Limited to the DSE 5.0 API.
-
DSE Ruby driver (EOL)
The DSE-only Ruby driver reached EOL in January 2022.
If you need to support a legacy application, all versions of the DSE-only Ruby driver are partially compatible with DSE 6.9, 6.8, and 5.1. This driver is limited to the DSE 5.0 API.