[Backlogmanager] [FIWARE-JIRA] (HELP-17867) [fiware-stackoverflow] Fiware Quantum Leap Date Query

Fernando Lopez (JIRA) jira-help-desk at jira.fiware.org
Mon Jun 14 07:53:00 CEST 2021


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

Fernando Lopez reassigned HELP-17867:
-------------------------------------

    Assignee: MARTEL

> [fiware-stackoverflow] Fiware Quantum Leap Date Query
> -----------------------------------------------------
>
>                 Key: HELP-17867
>                 URL: https://jira.fiware.org/browse/HELP-17867
>             Project: Help-Desk
>          Issue Type: Monitor
>          Components: FIWARE-TECH-HELP
>            Reporter: Backlog Manager
>            Assignee: MARTEL
>              Labels: cratedb, fiware, fiware-cygnus, fiware-orion, sql
>
> Created question in FIWARE Q/A platform on 11-06-2021 at 07:06
> {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/67932711/fiware-quantum-leap-date-query
> +Question:+
> Fiware Quantum Leap Date Query
> +Description:+
> I am currently using Quantum Leap/CrateDB to persist time series data through the Orion Context Broker.
> After setting up the notification on Orion I can query data.
> curl -X GET "http://localhost:8668/v2/entities/urn:ngsi-ld:Pmr_obs:001/attrs/slotStatus?limit=3" -H "Accept: application/json" -H "Fiware-Service: atos" -H "Fiware-ServicePath: /mtp"
> Response
> {
>   "attrName": "slotStatus",
>   "entityId": "urn:ngsi-ld:Pmr_obs:001",
>   "index": [
>     "2019-07-28T19:00:00.000+00:00",
>     "2019-07-29T07:00:00.000+00:00",
>     "2019-07-29T10:00:00.000+00:00"
>   ],
>   "values": [
>     0,
>     1,
>     0
>   ]
> }
> But when I try to query data over a specific period (between two dates), the server returns all the indices and the values and not for the period I select.
> curl -X GET "http://localhost:8668/v2/entities/urn:ngsi-ld:Pmr_obs:001/attrs/slotStatus?dateFrom=2020-12-01T00:00:00.000Z&dateTo=2020-12-31T23:59:59.999Z" -H "Accept: application/json" -H "Fiware-Service: atos" -H "Fiware-ServicePath: /mtp"
> Response (all the values from 2019 to end of 2020)
> What is strange is that if I use an aggregate method it filters the data correctly using the specific date period.
> curl -X GET "http://localhost:8668/v2/entities/urn:ngsi-ld:Pmr_obs:001/attrs/slotStatus?aggrMethod=count&dateFrom=2020-12-01&dateTo=2020-12-31" -H "Accept: application/json" -H "Fiware-Service: atos" -H "Fiware-ServicePath: /mtp"
> Response
> {
>   "attrName": "slotStatus",
>   "entityId": "urn:ngsi-ld:Pmr_obs:001",
>   "index": [],
>   "values": [
>     1101
>   ]
> }
> What should I do to only query data from a specific period without an aggregate method?
> Thanks in advance.
> quantumleap:0.8
> crate:4.1.4



--
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