COUNT returns null, not zero, if there are no matching points: https://github.com/influxdata/influxdb/issues/6412
On Mon, Nov 7, 2016 at 3:49 AM, Julien Ammous <[email protected]> wrote: > Hi, > I still trying to figure out how tick scripts works, my latest attempt is > this: > > batch > |query('select COUNT(*) from metrics.raw.loss') > .period(10s) > .every(10s) > .groupBy(time(10s)) > |httpOut('out') > > I also tried that way: > > batch > |query('select * from metrics.raw.loss') > .period(10s) > .every(10s) > |count('value') > |httpOut('out') > > > In both cases I get weird results... > > My first issue is that the http endpoint contains nothing as long as no > points are returned by the query, which makes no sense to me since I am > querying the count not the data themselves > > The second issue is that once 1 or more row are available the http page is > updated and that is fine but started from then the page will never be > updated again, let's say I insert a row and wait, I will get a correct json > with a count value of 1, now I insert two other rows and wait and... > nothing, the http output still says count 1 and the timestamp didn't change > althought I saw the query executed on the influxdb server console. > > That's really frustrating, a lot of hidden things seems to happen behind > the scene and that's a real pain to debug, the task http endpoint helps a > bit but not that much... > > > > > > > > -- > Remember to include the version number! > --- > You received this message because you are subscribed to the Google Groups > "InfluxData" 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/e28f42ff-89cf-4d28-a0b1-cd58fae11be9%40googlegroups.com > <https://groups.google.com/d/msgid/influxdb/e28f42ff-89cf-4d28-a0b1-cd58fae11be9%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Sean Beckett Director of Support and Professional Services InfluxDB -- Remember to include the version number! --- You received this message because you are subscribed to the Google Groups "InfluxData" 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/CALGqCvM-AU5hLW-LAXcDhdHZq%2BwBKcq-wbqf_thW43Y80GpzFQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
