Add jexl example to ngsi payload#802
Open
danielvillalbamota wants to merge 2 commits intotelefonicaid:masterfrom
Open
Add jexl example to ngsi payload#802danielvillalbamota wants to merge 2 commits intotelefonicaid:masterfrom
danielvillalbamota wants to merge 2 commits intotelefonicaid:masterfrom
Conversation
…-ngsi-payload Add jexl example to ngsi payload
mapedraza
reviewed
Jan 26, 2024
| are include as NGSI-v2 metadata in the entity corresponding to the measure at Context Broker. Note IOTA doesn't | ||
| provide the `type` for that metadata, so the Context Broker applies | ||
| [a default type based in the metadata `value` JSON type](https://github.com/telefonicaid/fiware-orion/blob/master/doc/manuals/orion-api.md#partial-representations). | ||
| - JEXL expression take place after key-value payload transformation, i.e. (1) NGSI-v2 batch update example after key-value tranformation would be: |
Collaborator
There was a problem hiding this comment.
What do you think about reformulate it in this way:
Only attributes value are available in JEXL context. In other words, it is not possible to access to attribute type or metadata. In order to address to the attribute value when using it in a JEXL expression, it is only required to use the attribute name. For example, in order to use attr2 value from pervious example, the expression should be something like this: "expression":"'This is my'+attr2"
Makes sense?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.