Skip to content

Deleting Data

Remove individual datapoints from a dataset collection by specifying their unique identifiers, or delete many at once by selecting an entire time range.

Check out the examples below for common scenarios of deleting data from a collection.

Deleting data by datapoint IDs

To delete data from a collection, use the delete method. This method accepts a list of datapoint IDs to delete.

Output plaintext
Deleted 2 data points.

Possible errors

  • NotFoundError: raised if one of the data points is not found in the collection. If any of the data points are not found, nothing will be deleted
  • ValueError: raised if one of the specified ids is not a valid UUID

Deleting a time interval

One common way to delete all datapoints in a time interval is to first query it from a collection and then deleting those found datapoints. For this use case it often is a good idea to query the datapoints with skip_data=True to avoid actually loading the data fields, since only the datapoint IDs are required. See skipping data fields for more details.

Output plaintext
Deleted 104 data points.

Automatic batching

Tilebox automatically batches the delete requests for you, so you don’t have to worry about the maximum request size.

Type to search…