Executing SQL Queries

Once you have established a connection, you can execute SQL queries against the TileDB Cloud database. To do so, create a Statement object and call the executeQuery method with your SQL query.

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

You can then handle the results like this:

while (rs.next()) { 
int rows = resultSet.getInt("rows"); 
// Process the retrieved values 

Last updated