You can call the DeleteTable operation to delete a specified table from the current instance.
- 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):
|table_name||The name of the table.|
The following code provides an example on how to delete a specified table:
try: # Call the operation to delete the table named SampleTable. ots_client.delete_table('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.