Process only unique data point

I want to make sure kapacitor processes only unique data point by setting up a flag after processing. I want to do something like this:

dbrp "TEST_MEASUREMENTS"."autogen"

        SELECT mean(data)
        FROM "TEST_MEASUREMENTS"."autogen"."temperature"
		WHERE "processed" != 'true'
        .crit(lambda: "mean" > 30)

I can ditch where for the node |changeDetect('processed'). Apparently my script does not work because it writes new data point to my table instead of updating the old ones with processed true. How can I achieve this with kapacitor?

Additionally for some reason doing “processed” == ‘false’ does not trigger the alert.

Seems like I would never get a response to this. However I understand that update is not available in influxdb so I flag the processed data points by overwriting them once I am done with processing. It does feel very hacky to me.