Skip to content

Add jexl example to ngsi payload#802

Open
danielvillalbamota wants to merge 2 commits intotelefonicaid:masterfrom
danielvillalbamota:master
Open

Add jexl example to ngsi payload#802
danielvillalbamota wants to merge 2 commits intotelefonicaid:masterfrom
danielvillalbamota:master

Conversation

@danielvillalbamota
Copy link
Copy Markdown
Contributor

No description provided.

@fgalan fgalan requested a review from mapedraza January 26, 2024 13:40
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:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

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

Successfully merging this pull request may close these issues.

2 participants