Delete predicate syntax

Use the InfluxDB /delete endpoint with InfluxDB Cloud and InfluxDB OSS 2.0 beta 16 or earlier.

The InfluxDB /delete endpoint uses an InfluxQL-like predicate syntax to determine what data to delete. InfluxDB uses the delete predicate to evaluate the series keys of points in the time range specified in the delete request. Points with series keys that evaluate to true for the given predicate are deleted. Points with series keys that evaluate to false are preserved.

A delete predicate is comprised of one or more . The left operand of the predicate expression is the column name. The right operand is the column value. Operands are compared using comparison operators. Use to combine two or more predicate expressions.

Example delete predicate

Logical operators join two or more predicate expressions.

Comparison operators compare left and right operands and return true or false.

OperatorDescriptionExampleResult
=Equal to“abc”=”abc”true

The following will delete points in the sensorData measurement:

The following will delete points from the prod-1.4 host in the us-west region:

The delete predicate syntax has the following limitations.

  • Delete predicates do not support the OR logical operator.
  • Delete predicates only support equality (=), not inequality (!=).
  • Delete predicates can use any column or tag except _time or _value.

Related articles

delete