edit-icon download-icon

CreateTable

Last Updated: Mar 23, 2018

Action:

CreateTable creates a table based on the given table structure information.

Note:

  • No read/write operation can be performed on a table immediately after it is created. Generally, a read/write operation can be performed on a new table one minute after it is created.
  • A single instance can contain up to 64 tables. To request raising the limit, open a ticket.

Request structure:

  1. message CreateTableRequest {
  2. required TableMeta table_meta = 1;
  3. required ReservedThroughput reserved_throughput = 2;
  4. optional TableOptions table_options = 3;
  5. optional StreamSpecification stream_spec = 5;
  6. }

table_meta:

  • Type: TableMeta

  • Required parameter: Yes

  • The structure information of the table to be created. The table_name must be unique within the instance. In primary_key, the number of ColumnSchema must range from one to four, the ColumnSchema names must comply with Table naming rules, and the type value can only be STRING, INTEGER, or BINARY.

  • Once a table is created, its Schema cannot be modified.

reserved_throughput:

  • Type: ReservedThroughput

  • Required parameter: Yes

  • The initial reserved read/write throughput for the table to be created. The maximum reserved throughput is 5,000 for each table.

  • The reserved read/write throughput settings for a table can be modified dynamically by using the UpdateTable operation.

table_options:

  • Type: TableOptions

  • Required parameter: Yes

  • Sets TimeToLive and MaxVersions.

stream_spec:

  • Type: StreamSpecification

  • Required parameter: No

  • Specifies whether to enable Stream-related attributes.

Response message structure:

  1. message CreateTableResponse {
  2. }
Thank you! We've received your feedback.