Skip to content

TileDB-Inc/TileDB-Cloud-JDBC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TileDB logo

TileDB-Cloud-JDBC

TileDB-Cloud JDBC Driver

This is a type 4 JDBC driver that allows a Java program to connect to TileDB-Cloud.

Usage

Load Driver Class

Class.forName("io.tiledb.TileDBCloudDriver")

Build from source code

./gradlew assemble

Authentication

Use the java.util.Properties class to add your credentials

Properties properties  = new Properties();
properties.setProperty("apiKey", "KEY");
properties.setProperty("rememberMe", "true");

Connection conn = DriverManager.getConnection("jdbc:tiledb-cloud:<NAMESPACE>", properties);

Where NAMESPACE is your TileDB-Cloud namespace.

Other available properties are:

  • username(String)
  • password(String)
  • verifySSL(boolean)
  • overwritePrevious(boolean)
  • listPublicArrays(boolean) lists all public TileDB arrays. Default: true

Run a simple query

Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM `tiledb://TileDB-Inc/quickstart_sparse`");

Limitations

Query results are limited to 2GBs in size.

Application compatibility

This driver is tested against the following applications/tools. Compatibility with other applications is not guaranteed.

Important Notice for Java 17+ Users

When running this project with Java version 17 or higher, it is essential to set the _JAVA_OPTIONS environment variable to avoid compatibility issues. Please use the following command:

export _JAVA_OPTIONS="--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED"

For more details see: https://arrow.apache.org/docs/java/install.html