News for hackers. Stuff that matters.
Re:ListenBrainz moves to TimescaleDB by samhld on Wednesday July 22, 2020 @01:40PM (#23919529)
(InfluxData solution architect here) Boolean is supported. You query it in the WHERE clause. Try `SELECT MAX(temperature) FROM ... WHERE temperature > 10`. That said, I'm not sure why you'd run a query like that in InfluxQL as it's the same as `SELECT max(temperature)`. :).
Re:ListenBrainz moves to TimescaleDB by RedShift1 on Wednesday July 22, 2020 @01:57PM (#23919715)
It's not the same thing. 'SELECT MAX(temperature) > 10 FROM ...' gets you all the datapoints, with a value of true or false. Moving it to the WHERE clause only gets you the datapoints where temperature is > 10. Yes, you can fill with 0 after the GROUP BY, but if all datapoints are less than 10, you get nothing back from the database. That's confusing: were all datapoints less than 10, or was there nothing registered in the time window I'm querying? Impossible to tell the difference. Not to mention some user interfaces just bailing: no data. I need to show a chart with a timeline of this condition being true or false.

Plus my actual use case is even more complex, not only do I need something like MAX(temperature) > 10, I need (MAX(temperature)) > 10 && (MAX(temperature) - MAX(dewpoint)) > 4.5).

Re:ListenBrainz moves to TimescaleDB by samhld on Wednesday July 22, 2020 @03:08PM (#23920463)
Yep you're right -- oversight on my part. To be clear, the "not sure why you'd run a query like that" was referring to doing it the InfluxQL way (which is not the same thing)...where your results would end up being the same controlling for time range.
Re:ListenBrainz moves to TimescaleDB by willvarfar on Wednesday July 22, 2020 @02:41PM (#23920193)
Question for influx solution architect:

How do you delete points from a specific measurement in a specific retention policy?

Re:ListenBrainz moves to TimescaleDB by jstrong on Wednesday July 22, 2020 @07:34PM (#23922716)
not a solution architect but, just delete by a very specific timestamp. this is not possible if you are writing at coarse time precisions, so don't do that.

`delete from meas_name where time='2020-07-22T15:40:58.375506762Z'` - just tried that and it deleted one row.

Re:ListenBrainz moves to TimescaleDB by willvarfar on Thursday July 23, 2020 @12:37AM (#23924217)
You didn’t specify the retention policy...?
Re:ListenBrainz moves to TimescaleDB by kev009 on Wednesday July 22, 2020 @02:18PM (#23919957)
Blame the customer. Nice solution, architect!
Re:ListenBrainz moves to TimescaleDB by samhld on Wednesday July 22, 2020 @02:58PM (#23920372)
Huh? I don't mean to come off as blaming anyone for anything. Trying to offer a work around for their problem with InfluxQL. They usually exist. They may not be good enough for some but offering them doesn't hurt. In this case, I certainly misunderstood the need though.