<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: QueryPropertyHistory returns partially empty rows in ThingWorx Developers</title>
    <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/QueryPropertyHistory-returns-partially-empty-rows/m-p/516350#M12480</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Silvia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you mean writing or reading with the same time stamp? I noticed that whole rows are missing if I tried to write multiple rows with the same timestamp &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case the values do exist in the database but depending on the QueryPropertyHistory start date some values are missing from the first few rows (oldest rows). If I extend the date range (with the start date) the missing values appear but the additional rows may be missing some values. The same goes the other way round: if I narrow down the date range the rows that had all their values may now be missing some values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am storing the data using my thing's service, which receives all the data at the same time and and inside the service the values are stored in the thing properties. I'd assume that this would be the preferred way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Risto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Mar 2017 14:49:07 GMT</pubDate>
    <dc:creator>rvaaraniemi</dc:creator>
    <dc:date>2017-03-20T14:49:07Z</dc:date>
    <item>
      <title>QueryPropertyHistory returns partially empty rows</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/QueryPropertyHistory-returns-partially-empty-rows/m-p/516344#M12474</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example (start date X, end date Y):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #c6c6c6; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: left; background-color: #f2f2f2; color: #505050; padding: 6px;" valign="middle"&gt;value1&lt;/TH&gt;&lt;TH style="text-align: left; background-color: #f2f2f2; color: #505050; padding: 6px;" valign="middle"&gt;value2&lt;/TH&gt;&lt;TH style="text-align: left; background-color: #f2f2f2; color: #505050; padding: 6px;" valign="middle"&gt;timestamp&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 6px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 6px;"&gt;9&lt;/TD&gt;&lt;TD style="padding: 6px;"&gt;just-example-dont-care&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 6px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 6px;"&gt;8&lt;/TD&gt;&lt;TD style="padding: 6px;"&gt;just-example-dont-care&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 6px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 6px;"&gt;7&lt;/TD&gt;&lt;TD style="padding: 6px;"&gt;just-example-dont-care&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 6px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 6px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 6px;"&gt;just-example-dont-care&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example (start date X - Z, end date Y):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #c6c6c6; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: left; background-color: #f2f2f2; color: #505050; padding: 6px;" valign="middle"&gt;value1&lt;/TH&gt;&lt;TH style="text-align: left; background-color: #f2f2f2; color: #505050; padding: 6px;" valign="middle"&gt;value2&lt;/TH&gt;&lt;TH style="text-align: left; background-color: #f2f2f2; color: #505050; padding: 6px;" valign="middle"&gt;timestamp&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 6px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 6px;"&gt;9&lt;/TD&gt;&lt;TD style="padding: 6px;"&gt;just-example-dont-care&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 6px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 6px;"&gt;8&lt;/TD&gt;&lt;TD style="padding: 6px;"&gt;just-example-dont-care&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 6px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 6px;"&gt;7&lt;/TD&gt;&lt;TD style="padding: 6px;"&gt;just-example-dont-care&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 6px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 6px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 6px;"&gt;just-example-dont-care&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 6px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 6px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 6px;"&gt;just-example-dont-care&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas? This really messes up my system.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;EDIT&amp;gt;&lt;/P&gt;&lt;P&gt;The same happens if I call the QueryPropertyHistory from a service I created or "manually" from the Thing -&amp;gt; Services -&amp;gt; Generic Services -&amp;gt; QueryPropertyHistory. I've changed only the endDate &amp;amp; startDate (query is empty and maxItems is 500).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could &lt;A _jive_internal="true" href="https://www.ptcusercommunity.com/message/52664#52664"&gt;this&lt;/A&gt; be related?&lt;/P&gt;&lt;P&gt;&amp;lt;/EDIT&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Risto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 11:42:21 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/QueryPropertyHistory-returns-partially-empty-rows/m-p/516344#M12474</guid>
      <dc:creator>rvaaraniemi</dc:creator>
      <dc:date>2017-03-01T11:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: QueryPropertyHistory returns partially empty rows</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/QueryPropertyHistory-returns-partially-empty-rows/m-p/516345#M12475</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.thingworx.com/u1/8455"&gt;Risto Vaaraniemi&lt;/A&gt;​,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you viewing the result in a Grid on a Mashup or directly Testing the service in the Thing?&lt;/P&gt;&lt;P&gt;If you are doing it on the Mashup; the thread &lt;A href="https://community.thingworx.com/message/52664"&gt;Re: Issue on QueryPropertyHistory&lt;/A&gt; could be related.&lt;/P&gt;&lt;P&gt;Also, please confirm the ThingWorx version you are on?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Mar 2017 03:05:12 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/QueryPropertyHistory-returns-partially-empty-rows/m-p/516345#M12475</guid>
      <dc:creator>ankigupta</dc:creator>
      <dc:date>2017-03-02T03:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: QueryPropertyHistory returns partially empty rows</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/QueryPropertyHistory-returns-partially-empty-rows/m-p/516346#M12476</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please also confirm the Database you are using?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Mar 2017 03:06:13 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/QueryPropertyHistory-returns-partially-empty-rows/m-p/516346#M12476</guid>
      <dc:creator>ankigupta</dc:creator>
      <dc:date>2017-03-02T03:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: QueryPropertyHistory returns partially empty rows</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/QueryPropertyHistory-returns-partially-empty-rows/m-p/516347#M12477</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using PostgreSQL through "ThingworxPersistenceProvider".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've called QueryPropertyHistory in my own service and also through the thing -&amp;gt; Services -&amp;gt; Generic Services -&amp;gt; QueryPropertyHistory (not on any Mashups) with same results. I've changed only the endDate &amp;amp; startDate parameters (query is empty and maxItems is 500). Usually I get about 10 to 20 rows of data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Version: 7.2.5-b56&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Risto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Mar 2017 08:11:39 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/QueryPropertyHistory-returns-partially-empty-rows/m-p/516347#M12477</guid>
      <dc:creator>rvaaraniemi</dc:creator>
      <dc:date>2017-03-02T08:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: QueryPropertyHistory returns partially empty rows</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/QueryPropertyHistory-returns-partially-empty-rows/m-p/516348#M12478</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone been able to reproduce this behaviour and confirm if it is a bug or an intended feature? Is there some information I could provide that would help pinpointing the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Risto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Mar 2017 13:35:29 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/QueryPropertyHistory-returns-partially-empty-rows/m-p/516348#M12478</guid>
      <dc:creator>rvaaraniemi</dc:creator>
      <dc:date>2017-03-20T13:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: QueryPropertyHistory returns partially empty rows</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/QueryPropertyHistory-returns-partially-empty-rows/m-p/516349#M12479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.thingworx.com/u1/8455"&gt;Risto Vaaraniemi&lt;/A&gt;​ If 2 logs/rows are queried in the same timestamp, in a stream or value stream, only the last one is saved. So one log/row per timestamp; if there are more, they are lost and overwritten by the last one. Is this also your case?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Mar 2017 14:14:07 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/QueryPropertyHistory-returns-partially-empty-rows/m-p/516349#M12479</guid>
      <dc:creator>sbalta</dc:creator>
      <dc:date>2017-03-20T14:14:07Z</dc:date>
    </item>
    <item>
      <title>Re: QueryPropertyHistory returns partially empty rows</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/QueryPropertyHistory-returns-partially-empty-rows/m-p/516350#M12480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Silvia,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you mean writing or reading with the same time stamp? I noticed that whole rows are missing if I tried to write multiple rows with the same timestamp &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case the values do exist in the database but depending on the QueryPropertyHistory start date some values are missing from the first few rows (oldest rows). If I extend the date range (with the start date) the missing values appear but the additional rows may be missing some values. The same goes the other way round: if I narrow down the date range the rows that had all their values may now be missing some values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am storing the data using my thing's service, which receives all the data at the same time and and inside the service the values are stored in the thing properties. I'd assume that this would be the preferred way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Risto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Mar 2017 14:49:07 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/QueryPropertyHistory-returns-partially-empty-rows/m-p/516350#M12480</guid>
      <dc:creator>rvaaraniemi</dc:creator>
      <dc:date>2017-03-20T14:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: QueryPropertyHistory returns partially empty rows</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/QueryPropertyHistory-returns-partially-empty-rows/m-p/516351#M12481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One thing occurred to me but I haven't tested it yet...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What would happen if I received and stored a set of values where only some of them would have changed from the last set of values (current value set)? Even if I wrote them all in the thing properties would the non-changed property values recorded with the same time stamp as the changed ones?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Risto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Mar 2017 06:16:56 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/QueryPropertyHistory-returns-partially-empty-rows/m-p/516351#M12481</guid>
      <dc:creator>rvaaraniemi</dc:creator>
      <dc:date>2017-03-21T06:16:56Z</dc:date>
    </item>
  </channel>
</rss>

