Creates a data table based on the specified schema.
Usage notes
After you create a data table, you cannot immediately perform read and write operations on the data table. In most cases, you can perform read and write operations on a data table one minute after the data table is created.
You can create up to 64 tables in a single instance. If you want to create more tables in a single instance, submit a ticket.
Request syntax
message CreateTableRequest {
required TableMeta table_meta = 1;
required ReservedThroughput reserved_throughput = 2;
optional TableOptions table_options = 3;
optional StreamSpecification stream_spec = 5;
}
Parameter | Type | Required | Description |
table_meta | Yes | The schema of the data table. Configure the following parameters: Important After you create a data table, you cannot modify the schema of the data table.
| |
reserved_throughput | Yes | The reserved read or write throughput of the data table. The reserved read or write throughput of a data table cannot exceed 100,000. Unit: capacity unit (CU). You can call the UpdateTable operation to change the reserved read or write throughput of a data table. | |
table_options | No | The table parameters, including time_to_live and max_versions. | |
stream_spec | No | Specifies whether to enable Stream-related attributes. |
Response syntax
message CreateTableResponse {
}
Use Tablestore SDKs
You can use the following Tablestore SDKs to create a data table based on the specified schema:
Tablestore SDK for Java: CreateTable
Tablestore SDK for Go: CreateTable
Tablestore SDK for Python: CreateTable
Tablestore SDK for Node.js: CreateTable
Tablestore SDK for .NET: CreateTable
Tablestore SDK for PHP: CreateTable