If you no longer want to use a Lastpoint index to obtain data of the latest point in time in time series in a time series table, you can call the DeleteTimeseriesLastpointIndex operation to delete the Lastpoint index.
Usage notes
Tablestore SDK for Go V1.7.15 or later supports the Lastpoint index feature. Before you use the Lastpoint index feature, make sure that Tablestore SDK for Go V1.7.15 or later is obtained.
Before you delete a Lastpoint index, make sure that the Lastpoint index is not used in your business.
A deleted Lastpoint index cannot be recovered. Proceed with caution.
Prerequisites
A Lastpoint index is created. For more information, see Create a Lastpoint index.
A TimeseriesClient is initialized. For more information, see Initialize a Tablestore client.
Parameters
Parameter | Description |
timeseriesTableName | The name of the time series table. |
lastpointIndexName | The name of the Lastpoint index. |
Example
The following sample code provides an example on how to delete a Lastpoint index named last_point_index that is created for a time series table name timeseries_table:
func deleteTimeseriesLastpointIndex(client *tablestore.TimeseriesClient) {
request := tablestore.NewDeleteTimeseriesLastpointIndexRequest("test_timeseries_table", "last_point_index")
_, err := client.DeleteTimeseriesLastpointIndex(request)
if err != nil {
log.Fatal(err)
}
}