I am following the guide to down sample and it’s not creating the measurement for the CQ.
I made a database Test and data will be populated in measurement “infoLog”
retention policies:
> show retention policies on “Test”
name duration shardGroupDuration replicaN default
---- -------- ------------------ -------- -------
autogen 0s 168h0m0s 1 false
4_weeks 672h0m0s 24h0m0s 1 true
a_year 8736h0m0s 168h0m0s 1 false
my CQ:
name: Test
name query
---- -----
cq_2m CREATE CONTINUOUS QUERY cq_2m ON Test BEGIN SELECT mean(UsedMemory) AS mean_UsedMemory INTO Test.a_year.downsampled_orders2min FROM Test."4_weeks".infoLog GROUP BY time(2m) END
cq_inst CREATE CONTINUOUS QUERY cq_inst ON Test RESAMPLE EVERY 2m BEGIN SELECT mean(InstantaneousOpsPerSec) AS mean_InstantaneousOpsPerSec INTO Test.a_year.downsampled_orders2min FROM Test.infoLog."4_weeks" GROUP BY time(2m) END
I’m trying to make a CQ that will get the average of a field every 2 minutes. I have also tried FOR…EVERY like this suggests.
Not sure what I’m doing wrong.