7 Replies Latest reply on Mar 21, 2017 2:16 AM by rvaaraniemi RSS
    rvaaraniemi Explorer

    QueryPropertyHistory returns partially empty rows

    Hi,

     

    I just experienced a problem with QueryPropertyHistory when querying data from a thing (logged with a Value Stream). When I select a time interval I'm interested in the result might have rows where some values are empty (undefined). However, if I expand the time frame (set an earlier startTime) the rows that were partially empty are usually filled in and there are new rows with some empty values.

     

    I have understood that writing data to streams is asynchronous but I'd expect that the writing should be done one event (row) at a time. This can happen even if there are minutes between the query start time and the actual first "row" time.

     

    Example (start date X, end date Y):

     

    value1value2timestamp
    19just-example-dont-care
    28just-example-dont-care
    37just-example-dont-care
    4just-example-dont-care

     

    Example (start date X - Z, end date Y):

     

    value1value2timestamp
    19just-example-dont-care
    28just-example-dont-care
    37just-example-dont-care
    46just-example-dont-care
    5just-example-dont-care

     

    Any ideas? This really messes up my system.

     

    <EDIT>

    The same happens if I call the QueryPropertyHistory from a service I created or "manually" from the Thing -> Services -> Generic Services -> QueryPropertyHistory. I've changed only the endDate & startDate (query is empty and maxItems is 500).

     

    Could this be related?

    </EDIT>

     

    BR,

    Risto