Skip to content
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

Should be the CB more flexible with dates/geo types allowing nulls/""? #3533

Closed
fgalan opened this issue Aug 2, 2019 · 8 comments
Closed
Milestone

Comments

@fgalan
Copy link
Member

fgalan commented Aug 2, 2019

Allow "" and null in DateTimes/ISO8601 and geo:xxx. This would be easier the life for clients.

@mrutid
Copy link
Member

mrutid commented Aug 2, 2019

There are (real) situations where you don't have a specific date or location for an attribute. Right now it is necessary to DELETE the attribute itself in order to manage this scenario (and it implies to develop non-trivial and special behaviours in GUI and FORMS for these two types) It would be nice to allow empty/null values for these types.

@jmcanterafonseca
Copy link
Contributor

NGSI-LD does not allow nulls. You can always define a dummy location (empty object) or dummy date (1st Jan 1970) to flag an unknown value ...

@fgalan
Copy link
Member Author

fgalan commented Oct 14, 2019

You may have wrong reports or analytics if you use dummy dates, locations (or dummy data in general) or you will need special processing to adapt reports to your "dummy data conveys". NULL has a clear, global, common semantic (and wide system/framework support) and IMHO is a good value to express "void/unknow".

So in NGSI_LD what would you plan to use as an "unknown" integer value? will it be 0? -99999?... it will be difficult to make analytics with that fake data.

Anyway we can discuss this NGSI-LD particularity, and the interoperability options with NGSIv2, when it start the merging process.

@jmcanterafonseca
Copy link
Contributor

my point is that if something is not known why it should appear as an Attribute value of an Entity at a particular point in time?

for instance, if a device is not available or is out of service then in that case an IoT Agent should not be updating anything to the CB, and let the value as it was before (either non-present or with its previous value).

@fgalan
Copy link
Member Author

fgalan commented Oct 30, 2019

my point is that if something is not known why it should appear as an Attribute value of an Entity at a particular point in time?

To make easier the life for clients, as my first entry in the issue tells :)

I mean, ideally, it can be as you said so if the client doesn't have the data, it doesn't send an attribute with it. But some clients (due to they have "fixed" the attributes they send and cannot omit them, I understand IOTAs are of that kind generally) cannot do that, and, in that case, null seems to be a good option from a semantical point of view.

@jmcanterafonseca
Copy link
Contributor

jmcanterafonseca commented Oct 30, 2019 via email

@fgalan
Copy link
Member Author

fgalan commented Jan 13, 2020

Related question at SOF (to be edited once this issue gets addressed): https://stackoverflow.com/questions/59642299/orion-context-broker-geolocation-how-to-deal-with-location-not-known

@fgalan
Copy link
Member Author

fgalan commented May 10, 2021

PR #3846

@fgalan fgalan added this to the 3.1.0 milestone May 10, 2021
@fgalan fgalan closed this as completed May 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants