I’m having an issue where the I can run a downsample query and it works but it does not seem to work in a continuous query. Here is my steps:
# I create my retention policies CREATE RETENTION POLICY "a_month" ON "mydb" DURATION 30d REPLICATION 1 DEFAULT CREATE RETENTION POLICY "a_year" ON "mydb" DURATION 365d REPLICATION 1 # Create the continous query CREATE CONTINUOUS QUERY downsamp ON mydb BEGIN SELECT mean(temp) AS "mean_temp" INTO "a_year"."downsampled_data" FROM "mydata" WHERE uuid='xyz' GROUP BY time(1m) END # Insert data into mydata 480 sequential 1 second intervals (query not shown) for today - 1 day, and today + 1 day (I understand historical data is not handled?). Telegraf is used for batching. # Confirm retention policies (show retention policies), confirm continuous query (show continuous queries), and that mydata has been inserted with show series mydata and in Grafana
The above all works but no downsample data is created, however it does get created if I manually run the same downsample query:
SELECT mean(temp) AS "mean_temp" INTO "a_year"."downsampled_data" FROM "mydata" WHERE uuid='xyz' GROUP BY time(1m)
What am I missing?