I try to delete some points from a measurement via Chronograf and compared this with the influx commandline:
Chronograf SELECT:
USE homeassistant
# Request failed with status code 400
# USE looks like not supported in Chronograf
SELECT * from "%" where entity_id='dht22_humidity' and time < '2020-12-19T15:00:00Z'
# Database name required
# So use the command below instead:
SELECT * from "homeassistant"."autogen"."%" where entity_id='dht22_humidity' and time < '2020-12-19T15:00:00Z'
# Correct output
influxd terminal SELECT:
USE "homeassistant"
# Using database homeassistant
SELECT * from "%" where entity_id='dht22_humidity' and time < '2020-12-19T15:00:00Z'
# name: %
# time attribution_str device_class_str domain entity_id friendly_name friendly_name_str i# con icon_str value
# ---- --------------- ---------------- ------ --------- ------------- ----------------- ---- -------- -----
# 1608314274417447936 sensor dht22_humidity 22 DHT22 Humidity mdi:water-percent 12
# 1608314289059613952 sensor dht22_humidity 22 DHT22 Humidity mdi:water-percent 11
# 1608314443618347776 sensor dht22_humidity 22 DHT22 Humidity mdi:water-percent 12
SELECT * from "homeassistant"."autogen"."%" where entity_id='dht22_humidity' and time < '2020-12-19T15:00:00Z'
# Same output
Chronograf DELETE:
DELETE from "homeassistant"."autogen"."%" where entity_id='dht22_humidity' and time < '2020-12-19T15:00:00Z'
# Request failed with status code 400
# Question: What is the correct DELETE syntax in Chronograf?
Influxd terminal DELETE:
USE homeassistant
# Using database homeassistant
DELETE from "homeassistant"."autogen"."%" where entity_id='dht22_humidity' and time < '2020-12-19T15:00:00Z'
# ERR: error parsing query: retention policy not supported at line 1, char 1
DELETE from "%" where entity_id='dht22_humidity' and time < '2020-12-19T15:00:00Z'
# Works
How can I run the same DELETE command in Chronograf?