Comments (3)
Hi @lucboj-htag,
Yes, this is the expected behavior. Better than my explanations, you can have a look at Annex C.6 (Date Representation) of the NGSI-LD API specification which explains this in details.
Btw, why don't you use the native temporal properties from NGSI-LD? For instance, you could define your entity in the following way:
{
"id": "urn:ngsi:TestObserved:123",
"type": "TestObserved",
"temperature": {
"type": "Property",
"value": 20.5,
"observedAt": "2024-02-19T12:32:52.98601Z"
},
"@context": [
"https://smartdatamodels.org/context.jsonld"
]
}
That makes the temperature and the observation date more related and it allows you to use the NGSI-LD Temporal API on the temperature
attribute (for instance, asking for the last values over a period of time, with aggregations,...)
PS: Fiware-ServicePath
is an NGSIv2 concept (it will be ignored when calling an NGSI-LD context broker). If you want to use a similar concept in NGSI-LD, have a look at scopes (introduced in section 4.18 of the NGSI-LD API specification)
from stellio-context-broker.
HI @bobeal,
thank you for your reply!
Annex C.6 explained it well and thank you for your tip on Fiware-ServicePath.
I am using "dateObserved" because I am migrating an existing NGSI V2 data model to NGSI-LD where "dateObserved" exist. Furthermore, many https://smartdatamodels.org require the field "dateObserved" to be used.
I do though add the "observedAt" field to fields where the NGSI-LD Temporal API is needed.
from stellio-context-broker.
I am using "dateObserved" because I am migrating an existing NGSI V2 data model to NGSI-LD where "dateObserved" exist. Furthermore, many https://smartdatamodels.org require the field "dateObserved" to be used.
Indeed, smart data models have a "constraint" to maintain compatibility with NGSIv2 and NGSI-LD. And it can sometimes add some fuzz in the data models :(
Closing this issue, don't hesitate to open a new one if you have other questions.
from stellio-context-broker.
Related Issues (20)
- Add support for `notificationTrigger` in subscriptions
- About migration from 2.3.0 to 2.7.0, with a big existing database on Kubernetes HOT 3
- Issue with @ character in DateTime data types (@type and @value are refused) HOT 3
- Upgrade to Timescale 2.12.x
- coordinates, q and georel parameters should accept encoded and unencoded reserved characters like `,` `;` `[` and `]`
- Add support for `VocabularyProperty` - 4.5.20
- Update simplified representation in multi-attribute case - 4.5.4
- log level for api-gateway can't be limited to WARN, INFO messages still appear in the logs, need of another variable to control logging level HOT 8
- Align Append and Update Entity Attributes to last expected behaviour
- Add support for JsonProperty
- `NGSILD-Tenant` Header Bad Request. Tenants are Strings and not IRIs. HOT 6
- Add support for `sysAttrs` in notifications parameters
- Add support for `cooldown` and `timeout` in endpoint definition
- Add support for `showChanges` and previous values in notifications parameters
- Relaxing of tenant names to allow for any string
- Stellio Take so much time to execute temporal queries HOT 2
- Add a pre-commit hook to run Detekt
- Missing controls over the attributes when updating a subscription
- Request for Guidance on Efficient Data Visualization with Grafana and Superset using TimescaleDB HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stellio-context-broker.