Hi Lindsey,
I tried solving this by using the externalCalculation-Function of Seeq. I created a python script and modified the functions initialize and compute as followed:
def initialize(self):
self.sum = 0
pass
def compute(self, key, samples_for_key):
self.sum += samples_for_key[0]
if self.sum < 0:
self.sum = 0
return key, self.sum
The script is called by using externalCalculation('CusumP.py:NUMERIC:M6CBe8UAQoSN',$d)
However, when I am using this script I get the following error message on execution:
Error getting data: Client data source exception: Error processing external calculation request: Script CusumP.py:NUMERIC:M6CBe8UAQoSN is not respecting the requirement to do only calculations that operate on data at a single key. Script needs to be changed. Exception: java.lang.RuntimeException at 'externalCalculation', line=1, column=1. To retry, use the button to the right.
Why is this behaviour blocked by Seeq?
Thorsten