All Products
Search
Document Center

Tablestore:Java SDK

Last Updated:Jun 28, 2025

Tablestore Java SDK supports operations for the Wide Column model, TimeSeries model, and Message model.

Feature list

Before you use the SDK features, you need to initialize Tablestore Client. For detailed features of the Wide Column model and TimeSeries model supported by the Java SDK, see the following table. For information about how to use the Message model, see Message model.

Wide Column model

Feature type

Feature operation

Description

Data table operations

Create a data table

You can create a data table to store data. You can configure data encryption and auto-increment primary key columns when you create a data table.

Update table configurations

Updates the configurations of a data table.

List data tables

View the names of all data tables in an instance.

Query table information

Queries the configurations of a data table.

Delete a data table

You can delete a data table.

Predefined column operations

You can add predefined columns to or removes predefined columns from a data table. When you create a secondary index, you can set the index columns or attribute columns of the secondary index to the predefined columns that you specified when you created the data table.

Data operations

Write data

Write data to a data table, including writing a single row of data and batch data operations.

Update data

Update data in a data table, including updating a single row of data and batch data operations.

Read data

Read data from a data table, including reading a single row of data, reading data within a range, reading multiple rows of data, and iterative reading.

Delete data

Delete data from a data table, including deleting a single row of data and batch data operations.

Filter

Filter the read results on the server side based on the conditions in the filter.

Conditional update

Update data in a table only when the specified conditions are met. Otherwise, the update fails and an error is returned.

Atomic counter

The atomic counter feature allows you to specify a column as an atomic counter and perform atomic counter operations on the column.

Local transaction

After you enable local transaction for a data table, you can create a local transaction based on a partition key value.

ComputeSplitsBySize

You can split data in a table into logical shards whose sizes are approximately the specified value. The information about the split points among the shards and the machines on which the shards reside is returned.

Incremental data operations

Tablestore provides operations related to incremental data.

  • View the Stream information of a table.

  • Obtain the iterator and update information of a shard in a Stream.

Offline write

You can write multiple rows of data to data tables at the same time in big data scenarios.

Offline read

You can read multiple rows of data from data tables at the same time in big data scenarios.

Search index

Create a search index

You can create a search index for a data table.

List search indexes

Query search indexes that are created for a table.

Update search index configurations

Update the time to live (TTL) of a search index.

Query search index description

Query the description of a search index, including the information about the fields in the search index and configurations of the search index.

Delete a search index

Delete a specified search index.

Lifecycle management

Delete historical data or extend the retention period of data in a search index based on business requirements.

Basic query

Basic query types include match all query, term query, terms query, prefix query, suffix query, wildcard query, range query, exists query, collapse (deduplicate), geo query, and nested query.

Boolean query

Query conditions can contain one or more subconditions. Data is returned when the subconditions are met.

Sorting and pagination

When you use a search index to query data, you can specify a sorting method for the returned data. When the number of returned rows is large, you can use offset-based pagination or token-based pagination to quickly locate the required data.

Statistical aggregation

You can implement operations such as finding the minimum value, finding the maximum value, calculating the sum, calculating the average, counting rows, counting distinct values, grouping by field values, grouping by range, grouping by geo location, and grouping by filter. Multiple statistical aggregation features can be used together to meet complex query requirements.

Full-text index

Tablestore provides match query and phrase query for full-text indexing. When you query data, the data is matched based on the tokenization results. You can use the summary and highlight feature to highlight the query terms.

Vector search

You can use the k-nearest neighbor (KNN) vector query feature to perform an approximate nearest neighbor search based on vectors. This way, you can find data items that have the highest similarity as the vector that you want to query in a large-scale dataset.

Concurrent data export

When you do not need to sort the entire result set, you can use the parallel scan feature to return all matched data at a faster speed.

Secondary index

Create a secondary index

Create a secondary index for a data table.

Use a secondary index to read data

You can query data in a secondary index by reading a single row of data or reading data whose primary key values are within a specific range. If the required attribute columns are included in the secondary index, data can be directly read from the secondary index. Otherwise, data must be read from the data table.

Delete a secondary index

Delete a specified secondary index from a data table.

Tunnel service

Create a tunnel

Create a tunnel for a data table for real-time data consumption.

Get tunnel information in a table

List the information about all tunnels in a data table, such as the tunnel name, tunnel type, tunnel ID, tunnel stage, and whether the data is expired.

Get detailed tunnel information

Get detailed information about a tunnel, such as tunnel information and channel information in the tunnel.

Delete a tunnel

Delete a tunnel from a data table.

SQL query

Create a mapping table

Create a mapping table for an existing table or index.

Update mapping table attribute columns

Add or remove attribute columns in an existing mapping table.

Delete a mapping table

Delete one or more mapping tables.

List mapping table names

List the mapping tables in the current database.

Query table description

Query the description of a table, such as field names and field types.

Query index description

Query the index description of a table.

Query data

You can use the SELECT syntax to query data in a table.

Get time type data

After you use SQL statements to query time type data (including Datetime, Date, and Time), you can obtain the specific data based on your requirements.

Data Lake Analytics

Create a delivery task

Create a delivery task to deliver data from a Tablestore data table to an OSS bucket for storage.

List delivery task names

List all delivery task information for a data table, such as the data table name, delivery task name, and delivery task type.

Query delivery task description

Queries the descriptive information of a delivery task.

Delete a delivery task

Deletes a delivery task.

TimeSeries model

Feature type

Specific feature

Description

Time series table operations

Create a time series table

Create a time series table to store time series data.

Update time series table configurations

Update the configurations of a time series table or time series metadata.

List time series table names

Query the names of all time series tables in an instance.

Query time series table description

Query the information about a time series table, such as the TTL configuration.

Delete a time series table

Delete a time series table.

Time series data operations

Write time series data

Write time series data to the time series in a batch.

Query time series data

Query the time series data that meets the specified conditions in a specific time series.

Time series operations

Retrieve time series

Specify multiple conditions to retrieve time series information, such as the metric name and data source information.

Update time series

Update time series metadata. Batch updates are supported.

Delete time series

Delete time series metadata. Batch deletions are supported.

Time series analytics storage

Create analytics storage

Create analytics storage for an existing time series table to store time series data at a low cost and to quickly query and analyze time series data.

Update the TTL of analytics storage

Update the TTL configuration of time series analytics storage. After you update the TTL of analytics storage, Tablestore automatically and asynchronously clears data that exceeds the TTL from analytics storage.

Query analytics storage description

Query the description of analytics storage, such as the TTL configuration, data synchronization options, data synchronization status, and data storage size.

Delete analytics storage

Delete analytics storage from a time series table.

Lastpoint index

Create a Lastpoint index

Create a Lastpoint index for a time series table to quickly retrieve the latest time point data of each time series.

Query Lastpoint index data

You can query data in a Lastpoint index.

Retrieve Lastpoint index

You can use a search index that is created for a Lastpoint index to retrieve data in the Lastpoint index. Search indexes can be used to accelerate data retrieval for Lastpoint indexes and provide multi-dimensional query and statistical analysis capabilities.

Delete a Lastpoint index

You can delete a Lastpoint index that you no longer require.

SQL query

Create a mapping table

Create a mapping table for an existing table or index.

Update mapping table attribute columns

Add or remove attribute columns in an existing mapping table.

Delete a mapping table

Delete one or more mapping tables.

List mapping table names

List the mapping tables in the current database.

Query table description

Query the description of a table, such as field names and field types.

Query index description

Query the index description of a table.

Query data

Query data in a table.

Version compatibility

The latest version of Tablestore SDK for Java is V5.x.x. The following section describes the compatibility of the latest version with earlier versions:

  • Tablestore SDK for Java V4.x.x: compatible

  • Tablestore SDK for Java V2.x.x: incompatible

For more information, see Java SDK release history.

References