delete Method

On This Page

Description

Deletes a TSDB table.

Syntax

delete(backend, table)

Note

The method has additional parameters that aren’t currently supported for the TSDB backend. Therefore, when calling the method, be sure to explicitly specify the names of all parameters after table.

Parameters

backend | if_missing | table

backend
The backend type — "tsdb" for the TSDB backend. See Backend Types.

  • Type: str
  • Requirement: Required
table
The relative path to the backend data — a directory in the target data container (as configured for the client object) that represents a TSDB table. For example, "mytable" or "examples/tsdb/my_metrics".

  • Type: str
  • Requirement: Required
if_missing

Determines whether to raise an error when the specified TSDB table (table) doesn’t exist.

  • Type: pb.ErrorOptions enumeration. To use the enumeration, import the frames_pb2 module; for example:

      from v3io_frames import frames_pb2 as fpb
  • Requirement: Optional
  • Valid Values: FAIL to raise an error when the specified table doesn’t exist; IGNORE to ignore this
  • Default Value: FAIL

Errors

In case of an error, the method raises a DeleteError error.

Examples

Following are some usage examples for the delete method of the Frames TSDB backend.

  1. Delete a mytsdb TSDB table in the client’s data container (table):

    tsdb_table = "mytsdb"
    client.delete(backend="tsdb", table=tsdb_table)
  2. Delete a tsdb/my_metrics TSDB table in the client’s data container (table); don’t raise an error if the table doesn’t exist (if_missing = IGNORE):

    from v3io_frames import frames_pb2 as fpb
    tsdb_table = "/tsdb/my_metrics"
    client.delete("tsdb", table=tsdb_table, if_missing=fpb.IGNORE)

See Also