[Backlogmanager] [FIWARE-JIRA] (HELP-19013) [fiware-stackoverflow] QuantumLeap truncating float data from Orion Context Broker

Fernando Lopez (JIRA) jira-help-desk at jira.fiware.org
Wed Dec 8 09:58:00 CET 2021


     [ https://jira.fiware.org/browse/HELP-19013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Fernando Lopez reassigned HELP-19013:
-------------------------------------

    Assignee: MARTEL

> [fiware-stackoverflow] QuantumLeap truncating float data from Orion Context Broker
> ----------------------------------------------------------------------------------
>
>                 Key: HELP-19013
>                 URL: https://jira.fiware.org/browse/HELP-19013
>             Project: Help-Desk
>          Issue Type: Monitor
>          Components: FIWARE-TECH-HELP
>            Reporter: Backlog Manager
>            Assignee: MARTEL
>              Labels: fiware, fiware-orion
>
> Created question in FIWARE Q/A platform on 01-12-2021 at 17:12
> {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/70188885/quantumleap-truncating-float-data-from-orion-context-broker
> +Question:+
> QuantumLeap truncating float data from Orion Context Broker
> +Description:+
> We are using the Orion Context broker and now in combination with QuantumLeap and CrateDB. we are not so familiar QuantumLeap and need help with something that we find to be strange.
> In the Context Broker we have entity with data:
> {
>      "id": "SC-5C0272FFFE8C206C",
>      "type": "StreetlightControlCabinet",
>      "activePowerR": {
>          "type": "Number",
>          "value": 0.7456,
>          "metadata": {
>              "timestamp": {
>                  "type": "DateTime",
>                  "value": "2021-12-01T16:33:13.00Z"
>              }
>          }
>      },
>      "activePowerS": {
>          "type": "Number",
>          "value": 0.5747,
>          "metadata": {
>              "timestamp": {
>                  "type": "DateTime",
>                  "value": "2021-12-01T16:33:13.00Z"
>              }
>          }
>      },
>      "activePowerT": {
>          "type": "Number",
>          "value": 0.4297,
>          "metadata": {
>              "timestamp": {
>                  "type": "DateTime",
>                  "value": "2021-12-01T16:33:13.00Z"
>              }
>          }
>      },
> .......
> }
> All three attributes has Number values and comes from "IoT agent MQTT/JSON".
> Quantum Leap has subscription to Context Broker:
> {
>      "description": "QL - StreetlightControlCabinet",
>      "subject": {
>          "entities": [
>              {
>                  "idPattern": ".*",
>                  "type": "StreetlightControlCabinet"
>              }
>          ],
>          "condition": {
>              "attrs": [
>                  "activePowerR",
>                  "activePowerS",
>                  "activePowerT",
> ...
>              ]
>          }
>      },
>      "notification": {
>          "http": {
>              "url": "http://quantumleap:8668/v2/notify"
>          },
>          "metadata": ["dateCreated", "dateModified", "timestamp"],
>          "attrs": [
>                  "activePowerR",
>                  "activePowerS",
>                  "activePowerT",
> .....
>          ]
>      }
> }
> The QuantumLeap (V0.5) creates CrateDB data series with floating point value type only if first value in the serie is fractional (like 0.7456).
> If first value in serie can be converted to integer without loosing of precision (like 0, 1.0, 2.0, etc), the QuantumLeap will create the data series with integer base type in CrateDB.
> As result, all following incoming data will truncated to integers in the database.
> So this is strange since in the QuantumLeap sources we found that a "Number" attribute type should always be mapped to "float" datatype in CrateDB.
> Anyone that may have an explanantion what the issue can be?



--
This message was sent by Atlassian JIRA
(v6.4.1#64016)


More information about the Backlogmanager mailing list

You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy   Cookies policy