-
Hello everyone, I have a use case where I collect temperature readings from multiple devices using EdgeX Foundry. Since I am using the same device profile, the resource is called Temperature for each device. I would like to retrieve the latest value of a specific temperature based on the deviceName metadata using the latest or lag functions. However, I've encountered an issue where the meta function doesn't seem to work with these functions. It always returns the last received temperature from all devices, rather than filtering based on the deviceName metadata. Is it possible to filter based on metadata when using the latest or lag functions? If so, could someone provide an example or guide me in the right direction? Thank you in advance for your help! 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Got it, we'll take a look. Could you please provide your SQL here? |
Beta Was this translation helpful? Give feedback.
To get conditional latest, use latest() OVER (WHEN a != 2). Check https://ekuiper.org/docs/en/latest/sqls/functions/analytic_functions.html#analytic-functions