influxdata/flux

oee.APQ: internal error: panic: unknown type invalid

Basbosbaas opened this issue · 1 comments

First of all, its great that this package exists!

But when I use it I get the folowing errorcode: internal error: panic: unknown type invalid

What I want is to window the data per hour and calculate the OEE per hour.
But when I have just one row in a table after the |> group(columns: ["_start", "_stop"]) I get this error.
This is my whole query:

import "experimental/oee"
from(bucket: "TestOee2")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "Status")
|> window(every: 1h)
|> group(columns: ["_start", "_stop"])
|> map(fn: (r) => ({ r with partCount: float(v: r.Productienummer)}))
|> map(fn: (r) => ({ r with badCount: 1}))
|> map(fn: (r) => ({ r with state: r._value}))
|> keep(columns: ["_start", "_stop", "_time", "badCount", "partCount", "state"])
|> group(columns: ["_start", "_stop"])
|> oee.APQ(runningState: 20.0, plannedTime: 1h, idealCycleTime: 120s )
|> group()

This issue has had no recent activity and will be closed soon.