Table Admin API
After creating an
Instance, you can
interact with individual tables, groups of tables or column families within
If you want a comprehensive list of all existing tables in a instance, make a
ListTables API request with
>>> instance.list_tables() [<google.cloud.bigtable.table.Table at 0x7ff6a1de8f50>, <google.cloud.bigtable.table.Table at 0x7ff6a1de8350>]
To create a
table = instance.table(table_id)
Even if this
has been created with the API, you’ll want this object to use as a
parent of a
Create a new Table
After creating the table object, make a CreateTable API request
If you would like to initially split the table into several tablets (tablets are similar to HBase regions):
Delete an existing Table
Make a DeleteTable API request with
List Column Families in a Table
Though there is no official method for retrieving column families associated with a table, the GetTable API method returns a table object with the names of the column families.
To retrieve the list of column families use
column_families = table.list_column_families()
Column Family Factory
To create a
column_family = table.column_family(column_family_id)
There is no real reason to use this factory unless you intend to create or delete a column family.
In addition, you can specify an optional
column_family = table.column_family(column_family_id, gc_rule=gc_rule)
This rule helps the backend determine when and how to clean up old cells in the column family.
See Column Families for more information about
and related classes.
Create a new Column Family
After creating the column family object, make a CreateColumnFamily API
Delete an existing Column Family
Make a DeleteColumnFamily API request with
Update an existing Column Family
Make an UpdateColumnFamily API request with
Now we go down the final step of the hierarchy from
Row as well as streaming
data directly via a
Head next to learn about the Data API.