All Products
Search
Document Center

Tablestore:Delete a time series table

Last Updated:Jun 11, 2024

You can call the DeleteTimeseries operation to delete a time series table.

Prerequisites

Parameters

Parameter

Description

timeseriesTableName

The name of the time series table. You can query the names of time series tables in an instance. For more information, see Query the names of time series tables.

Examples

The following sample code provides an example on how to delete a time series table in an instance:

func DeleteTimeseriesTableSample(client *tablestore.TimeseriesClient , timeseriesTableName string) {
    fmt.Println("[Info]: Begin to delete timeseries table !")
    // Construct the request to delete the time series table. 
    deleteTimeseriesTableRequest := tablestore.NewDeleteTimeseriesTableRequest(timeseriesTableName)
    // Call the time series client-related API operation to delete the time series table. 
    deleteTimeseriesTableResponse , err := client.DeleteTimeseriesTable(deleteTimeseriesTableRequest)
    if err != nil {
        fmt.Println("[Error]: Delete timeseries table failed with error: " , err)
        return
    }
    fmt.Println("[Info]: DeleteTimeseriesTableSample finished ! RequestId: " , deleteTimeseriesTableResponse.RequestId)
}

References

For more information about the API operation, see DeleteTimeseriesTable.