I want to apply window() using data from my stream to configure window’s parameters:
dbrp "snmp_trap"."default"
stream
|from()
.measurement('snmp_trap')
|sideload()
.source('file:///tmp/chronic_conf')
.order('{{.name}}.yml')
.field('chronic_count', 0)
.field('chronic_period', 0)
|where(lambda: "chronic_count" > 0)
|window()
.everyCount("chronic_count")
|alert()
.info(lambda: TRUE)
.log('/tmp/chronic.log')
This fails with:
invalid TICKscript: line 15 char 4: error calling func "everyCount" on obj *pipeline.WindowNode: reflect.Set: value of type *ast.ReferenceNode is not assignable to type int64
Is it possible to convert field data to int64 that window().everyCount() would accept?