Skip to content

TileDB-Inc/TileDB-Cloud-JDBC

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.