I properly should have said there's no way to schedule a backfill query. CQs and bqckfill queries both involve INTO clauses.
The CQ should be logging when it runs. Do you see log entries for it? Are CQs enabled in the config file? Can you include the output from SHOW CONTINUOUS QUERIES? On Fri, Jul 15, 2016 at 8:01 AM, <[email protected]> wrote: > I'm having a similar challenge with a CQ created according to the > documentation. The DB shows the CQ exists, and if I execute a backfill > query as given in the documentation, data is populated, but there is > nothing automatically being added to the DB. > > The specific question I have is that documents show the "INTO" being > necessary if one wants to write to a specific retention policy. That seems > to contradict the "no way to schedule an INTO query" by Sean. > > Any help is appreciated. > > I'm working from the most recent documentation (matching the 1.0.0 beta2 > we're using for evaluating this stack) - > https://docs.influxdata.com/influxdb/v1.0/query_language/continuous_queries/ > > On Tuesday, May 24, 2016 at 11:43:50 AM UTC-4, Sean Beckett wrote: > > CQs only run against newly arrived data. INTO queries run against > arbitrary time ranges. There is no way to schedule an INTO query. > > > > > > Use INTO queries to backfill your previous data. Use CQs to downsample > newly arriving data. > > > > > > CQs do not respect any WHERE time clause. use GROUP BY time(1d) to have > the CQ run daily. See the docs for more: > https://docs.influxdata.com/influxdb/v0.13/query_language/continuous_queries/ > > > > > > On Thu, May 19, 2016 at 11:03 AM, Deepak Jain <[email protected]> wrote: > > > > I am using a INTO query and simply want to to run automatically every > day. And i thought that is what is one of purpose of CQ. > > > > > > On Tuesday, May 17, 2016 at 3:30:12 PM UTC-7, Sean Beckett wrote: > > WHERE time clauses in CQs are ignored. The CQ will only run against > recent data. > > > > > > For backfilling over the prior 120 days, you want to use the INTO > statement with a normal query. > https://docs.influxdata.com/influxdb/v0.13/query_language/data_exploration/#the-into-clause > > > > > > > > > > On Tue, May 17, 2016 at 2:36 PM, Deepak Jain <[email protected]> wrote: > > > > > > > > Things i tried. > > > > > > > > I tried andit did not work. > > > > > drop measurement bualerts > > > select * from bualerts > > > SHOW CONTINUOUS QUERIES > > > > > > name: _internal > > --------------- > > name query > > > > > > > > > > name: anomaly > > ------------- > > name query > > > > > > > > > > name: development > > ----------------- > > name query > > > > > > > > > > name: ep > > -------- > > name query > > bu CREATE CONTINUOUS QUERY bu ON ep RESAMPLE EVERY 1m BEGIN SELECT > count(distinct(eId)) AS units INTO ep."default".bualerts FROM > ep."default".epdetail WHERE time > now() - 30d GROUP BY time(1d), > businessUnit fill(none) END > > > > > > > select * from bualerts > > > > > time: 10.25 AM > > wait (go on coffee break) > > time: 10.30 AM > > > select * from bualerts > > > > > > > > > > > ==== > > Questions > > 0. Not working. > > 1. I have 120 days of data and i want to run the above query for last > 120 days (and data is collected once every day , hence groupby (1d)) > > 2. I want the above query to run every 1m (to test it out, if its > working) and later change it to run every 1h. (as i do not know when the > backend process will complete during the day). > > > > > > Regards, > > Deepak > > > > > > > > > > History > > ====== > > Based on the first query in the original comment, the query looks mostly > correct, but is missing something.CREATE CONTINUOUS QUERY bu ON ep RESAMPLE > EVERY 1m > > BEGIN > > SELECT count(distinct(eId)) as units INTO bualerts FROM > ep."default".epdetail WHERE time > now() - 30d GROUP BY time(1d), > businessUnit fill(none) > > END > > > > The time clause here is ignored and a time range is generated by the > continuous query service whenever it wants to calculate an interval. If you > want to calculate the last 30 days every 1 minute, you would need to > use RESAMPLE FOR 30d. Each bucket would still encompass only 1 day. With > the current query, I think it will only resample the last day every 1 > minute. > > > > > > > > > > > > > > -- > > > > Remember to include the InfluxDB version number with all issue reports > > > > --- > > > > You received this message because you are subscribed to the Google > Groups "InfluxDB" group. > > > > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected]. > > > > To post to this group, send email to [email protected]. > > > > Visit this group at https://groups.google.com/group/influxdb. > > > > To view this discussion on the web visit > https://groups.google.com/d/msgid/influxdb/24d37377-cbc6-490e-be7c-aa5c4fd92538%40googlegroups.com > . > > > > For more options, visit https://groups.google.com/d/optout. > > > > > > > > > > > > -- > > > > > > Sean Beckett > > Director of Support and Professional Services > > InfluxDB > > > > > > > > > > > > > > -- > > > > Remember to include the InfluxDB version number with all issue reports > > > > --- > > > > You received this message because you are subscribed to the Google > Groups "InfluxDB" group. > > > > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected]. > > > > To post to this group, send email to [email protected]. > > > > Visit this group at https://groups.google.com/group/influxdb. > > > > To view this discussion on the web visit > https://groups.google.com/d/msgid/influxdb/718a73e9-e8a7-489e-9c3f-6dc6626f3e26%40googlegroups.com > . > > > > > > > > For more options, visit https://groups.google.com/d/optout. > > > > > > > > > > > > -- > > > > > > Sean Beckett > > Director of Support and Professional Services > > InfluxDB > > -- > Remember to include the InfluxDB version number with all issue reports > --- > You received this message because you are subscribed to the Google Groups > "InfluxDB" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/influxdb. > To view this discussion on the web visit > https://groups.google.com/d/msgid/influxdb/ee31a096-cfc5-4de2-a719-2770cde337e3%40googlegroups.com > . > For more options, visit https://groups.google.com/d/optout. > -- Sean Beckett Director of Support and Professional Services InfluxDB -- Remember to include the InfluxDB version number with all issue reports --- You received this message because you are subscribed to the Google Groups "InfluxDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/influxdb. To view this discussion on the web visit https://groups.google.com/d/msgid/influxdb/CALGqCvPeyPKdNTKH_eeb%3DHQAJYOuMBbd-j-W7RdwyUmiBq_P1w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
