influxdata / influxdata/kapacitor
Cannot use derivative in batch queries because the query does not validate correctly
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
When I try to use non_negative_derivative in a batch query I get an error that I need to specify the group by interval even though it looks to me like I did. Here's my TICK script:
```
var read_stats = batch
|query('''SELECT non_negative_derivative(last("bytes"), 1s) as
bytes FROM "gpfs"."default"."read_stats" where fs = 'dmd' ''')
.period(10s)
.every(10s)
.groupBy(time(10s), *)
read_stats | httpOut('read_stats')
```
Here's the error:
```
non_negative_derivative aggregate requires a GROUP BY interval.
```
I'm using Kapacitor and InfluxDB 0.13.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the TICK batch query shown in the issue with Kapacitor and InfluxDB 0.13, then trace the query validation for non_negative_derivative and the GROUP BY interval. Done means the query validates and runs without incorrectly reporting that a GROUP BY interval is missing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend, stream-processing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100