Use Tablestore SDK for Python to delete a global or local secondary index without affecting the data table or its data.
Prerequisites
-
A client is initialized. For more information, see Initialize a Tablestore client.
-
A secondary index is created. For more information, see Create a secondary index.
Precautions
A deleted secondary index cannot be recovered. To use the index again, create a new secondary index.
Parameters
|
Parameter |
Description |
|
main_table_name |
The name of the data table. |
|
index_name |
The name of the index table. |
Examples
The following sample code provides an example on how to delete an index table:
client.delete_secondary_index('<TABLE_NAME>', '<INDEX_NAME>')