All Products
Search
Document Center

Tablestore:Operations on tables

Last Updated:Feb 11, 2025

This topic describes the table-level features provided by Tablestore SDK for Python.

Data table management

Operation

Description

Create a data table

You can create a data table to store data.

Create a data table

You can enable data at rest encryption (DARE) by configuring data encryption settings when you create a data table.

Update the configurations of a table

You can update the configuration information of a table, such as the time to live (TTL) and max versions.

Query the names of tables

You can query the names of all tables in an instance.

Query the description of a table

You can query the configurations of a table.

Delete tables

You can delete a table.

Data table features

Feature

Description

Scenario

Configure an auto-increment primary key column

You can specify a primary key column that is not the partition key as the auto-increment primary key column of a data table. If you write data to a table that contains an auto-increment primary key column, you do not need to specify values for the auto-increment primary key column. Tablestore automatically generates values for the auto-increment primary key column. Values generated for the auto-increment primary key column are unique and increase monotonically within a partition.

This feature is suitable for scenarios that require a unique identifier for each object, such as item IDs on e-commerce websites, user IDs on large websites, post IDs in forums, and message IDs in chat tools.

Configure conditional update

If you use conditional update, data in a table can be updated only when the conditions are met. Otherwise, the update fails and an error message is returned.

This feature is suitable for scenarios in which you want to specify data update conditions to update the data of a highly concurrent application.

Use the local transaction feature

After you enable local transaction for a data table, you can create a local transaction based on a partition key value. You can read and write data in the local transaction and then commit or discard the local transaction based on your business requirements.

This feature is suitable for scenarios in which you want to perform atomic operations to read or write one or more rows of data.

Use the atomic counter feature

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

This feature is suitable for scenarios in which you want to collect real-time statistical data for online applications, such as the number of page views (PVs) on various posts.

Filter

After you configure a filter, query results are filtered on the server side based on the filter conditions. Only rows of data that meet the filter conditions are returned.

This feature is suitable for scenarios in which you want to return query results that meet specific conditions.