You can call the DeleteTable operation to delete a specified table from the current instance.

Note For more information about the DeleteTable operation, see DeleteTable.


  • The OTSClient instance is initialized. For more information, see Initialization.
  • A table is created.
  • The index tables and search indexes for the table are deleted.


def delete_table(self, table_name):


Parameter Description
table_name The name of the table.


The following code provides an example on how to delete a specified table:

    # Call the operation to delete the table named SampleTable.
    # If the task succeeds, no exception is returned.
    print "delete table succeeded"
    # If the task fails, an exception is returned for you to handle.
except Exception:
    print "delete table failed"            

For the detailed sample code, visit DeleteTable@GitHub.