-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter by attribute in nosignal rules #735
Comments
I understand the issue refers to "attribute existance". NGSIv2 API (case when
For instance, this is the filter to match entities that have an attribute named
MongoDB query (case when
So for instance a query like the following one matches entities that have an attribute named
|
Mybe not only existance but attribute value |
Which value should be checked? Could you formulate the attribute value condition (in English) so I can "translate" to queries? |
I would like to check the absence of data only for entities of type Streetlight with temperature > 100 or flag == true |
I think I misunderstood the original description of this issue... Considering the new statement
Let's consider just only one condition:
would be
would be
The problem is with the or condition. CB API doesn't support or. But if we change to and, this way:
would be
|
Possible use case in order to ease the understanding of the issue. In a given subservice I could have some entities cosidered as "static" (they don't receive periodic data). These entities, could be of the same type than others consided as "dinamic" (they receive data on a period basis). For instance, I may have several streetlights sending data to the platform but some other just for inventary purposes. In this case, I would like to check the absence of data only for those entities considered as dinamic. I can mark these entities with a flag attribute and then state this attribute in the rule in order to filter the entities. |
So I understand we don't need combine several filters at the same time (only one, i.e. flag equality for |
Related PR about nosignal filters: #726 |
Current implementation of nosignal rules only allows to filter by Id and type. It would be nice to have an aditional filter by attribute, both at context broker level and mongo level.
More details about this issue to be provided.
The text was updated successfully, but these errors were encountered: