Method: projects.instances.tables.create

Creates a new table in the specified instance. The table can be created with a full set of initial column families, specified in the request.

HTTP request

POST https://bigtableadmin.googleapis.com/v2/{parent=projects/*/instances/*}/tables

The URL uses Google API HTTP annotation syntax.

Path parameters

Parameters
parent

string

The unique name of the instance in which to create the table. Values are of the form projects/<project>/instances/<instance>.

Authorization requires the following Google IAM permission on the specified resource parent:

  • bigtable.tables.create

Request body

The request body contains data with the following structure:

JSON representation
{
  "tableId": string,
  "table": {
    object(Table)
  },
  "initialSplits": [
    {
      object(Split)
    }
  ],
}
Fields
tableId

string

The name by which the new table should be referred to within the parent instance, e.g., foobar rather than <parent>/tables/foobar.

table

object(Table)

The Table to create.

initialSplits[]

object(Split)

The optional list of row keys that will be used to initially split the table into several tablets (tablets are similar to HBase regions). Given two split keys, s1 and s2, three tablets will be created, spanning the key ranges: [, s1), [s1, s2), [s2, ).

Example:

  • Row keys := ["a", "apple", "custom", "customer_1", "customer_2", "other", "zz"]
  • initial_split_keys := ["apple", "customer_1", "customer_2", "other"]
  • Key assignment:
    • Tablet 1 [, apple) => {"a"}.
    • Tablet 2 [apple, customer_1) => {"apple", "custom"}.
    • Tablet 3 [customer_1, customer_2) => {"customer_1"}.
    • Tablet 4 [customer_2, other) => {"customer_2"}.
    • Tablet 5 [other, ) => {"other", "zz"}.

Response body

If successful, the response body contains a newly created instance of Table.

Authorization

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/bigtable.admin
  • https://www.googleapis.com/auth/bigtable.admin.table
  • https://www.googleapis.com/auth/cloud-bigtable.admin
  • https://www.googleapis.com/auth/cloud-bigtable.admin.table
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Auth Guide.

Split

An initial split point for a newly created table.

JSON representation
{
  "key": string,
}
Fields
key

string (bytes format)

Row key to use as an initial tablet boundary.

A base64-encoded string.

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

Cloud Bigtable Documentation